MCPcopy Create free account
hub / github.com/CyCoreSystems/ari-proxy / Add

Method Add

session/objects.go:29–42  ·  view source on GitHub ↗

Add adds the given object

(id string)

Source from the content-addressed store, hash-verified

27
28// Add adds the given object
29func (o *Objects) Add(id string) bool {
30
31 if _, ok := o.Contains(id); ok {
32 return false
33 }
34
35 o.mutex.Lock()
36 defer o.mutex.Unlock()
37
38 o.ids = append(o.ids, id)
39 sort.Strings(o.ids)
40
41 return true
42}
43
44// Remove removes the given object, if it exists
45func (o *Objects) Remove(id string) bool {

Callers 3

TestObjectsAddFunction · 0.95
ensureBridgeFunction · 0.45
channelHandlerFunction · 0.45

Calls 1

ContainsMethod · 0.95

Tested by 1

TestObjectsAddFunction · 0.76