wip: needs tests

This commit is contained in:
Louis Seubert 2024-10-20 14:55:16 +02:00
parent 3d43ff4758
commit 09ef963ca3
Signed by: louis9902
GPG key ID: 4B9DB28F826553BD
3 changed files with 136 additions and 3 deletions

View file

@ -1,11 +1,29 @@
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
}
}