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

18 lines
322 B
Go
Executable File

package main
import (
"fmt"
"os"
"go.m3o.com/cache"
)
// Delete a value from the cache. If key not found a success response is returned.
func main() {
cacheService := cache.NewCacheService(os.Getenv("M3O_API_TOKEN"))
rsp, err := cacheService.Delete(&cache.DeleteRequest{
Key: "foo",
})
fmt.Println(rsp, err)
}