MCPcopy
hub / github.com/dropbox/godropbox / Get

Method Get

lockstore/map.go:45–45  ·  view source on GitHub ↗

Get returns the value for a key and whether or not it exists. If a ValueCheckFunc was defined in the LockingMapOptions when the map was created then it will be invoked and the value will only be returned if the checker returns true.

(string)

Source from the content-addressed store, hash-verified

43 // created then it will be invoked and the value will only be returned if
44 // the checker returns true.
45 Get(string) (interface{}, bool)
46
47 // Add the value to the map if and only if one of: it doesn't exist or (it exists,
48 // a ValueCheckFunc is defined, the check func returns false). Returns a bool

Callers 3

TestGetSetAddMethod · 0.95
TestGetWithCheckFuncMethod · 0.95
TestAddOrGetHoldsLockMethod · 0.95

Implementers 2

lockingMapcontainer/concurrent/lockstore/map.go
lockingMaplockstore/map.go

Calls

no outgoing calls

Tested by 3

TestGetSetAddMethod · 0.76
TestGetWithCheckFuncMethod · 0.76
TestAddOrGetHoldsLockMethod · 0.76