MCPcopy Create free account
hub / github.com/AdRoll/baker / Get

Method Get

record.go:79–86  ·  view source on GitHub ↗

Get fetches the value with the given key. If the key is not present in the cache Get returns (nil, false).

(key string)

Source from the content-addressed store, hash-verified

77// Get fetches the value with the given key. If the key is not present
78// in the cache Get returns (nil, false).
79func (c *Cache) Get(key string) (val interface{}, ok bool) {
80 if *c == nil {
81 return nil, false
82 }
83
84 val, ok = (*c)[key]
85 return
86}
87
88// Set assigns the given value to a specific key.
89func (c *Cache) Set(key string, val interface{}) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected