MCPcopy Create free account
hub / github.com/devfeel/dotweb / GetString

Method GetString

cache/runtime/cache_runtime.go:65–72  ·  view source on GitHub ↗

returns value string format by given key if non-existed or expired, return "".

(key string)

Source from the content-addressed store, hash-verified

63// returns value string format by given key
64// if non-existed or expired, return "".
65func (ca *RuntimeCache) GetString(key string) (string, error) {
66 v, err := ca.Get(key)
67 if err != nil || v == nil {
68 return "", err
69 } else {
70 return fmt.Sprint(v), nil
71 }
72}
73
74// returns value int format by given key
75// if non-existed or expired, return 0.

Callers 3

GetIntMethod · 0.95
GetInt64Method · 0.95

Calls 1

GetMethod · 0.95

Tested by 1