wip: needs tests
This commit is contained in:
parent
3d43ff4758
commit
09ef963ca3
3 changed files with 136 additions and 3 deletions
18
cmd/main.go
18
cmd/main.go
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue