29 lines
537 B
Go
29 lines
537 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
|
|
"git.geekeey.de/actions/sdk"
|
|
"git.geekeey.de/actions/sdk/cache"
|
|
)
|
|
|
|
func main() {
|
|
a := sdk.New()
|
|
a.AddMask("hello")
|
|
a.WithFieldsSlice("foo=bar", "biz=baz").Debugf("hello world")
|
|
blob, err := a.Cache().Load(context.Background(), "example")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
cache.Tar("./foo")
|
|
f, err := os.Open("")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
a.Cache().Save(context.Background(), "", cache.NewFileBlob(f))
|
|
entry := blob.Download(context.Background())
|
|
if entry == nil {
|
|
return
|
|
}
|
|
}
|