Files
m3o-go/examples/cache/set/setAValue/main.go
2021-12-09 15:06:12 +00:00

19 lines
323 B
Go
Executable File

package main
import (
"fmt"
"os"
"go.m3o.com/cache"
)
// Set an item in the cache. Overwrites any existing value already set.
func main() {
cacheService := cache.NewCacheService(os.Getenv("M3O_API_TOKEN"))
rsp, err := cacheService.Set(&cache.SetRequest{
Key: "foo",
Value: "bar",
})
fmt.Println(rsp, err)
}