MCPcopy
hub / github.com/cortexlabs/cortex / Add

Method Add

pkg/lib/sets/strset/strset.go:50–54  ·  view source on GitHub ↗

Add includes the specified items (one or more) to the Set. The underlying Set s is modified. If passed nothing it silently returns.

(items ...string)

Source from the content-addressed store, hash-verified

48// Add includes the specified items (one or more) to the Set. The underlying
49// Set s is modified. If passed nothing it silently returns.
50func (s Set) Add(items ...string) {
51 for _, item := range items {
52 s[item] = _keyExists
53 }
54}
55
56// Remove deletes the specified items from the Set. The underlying Set s is
57// modified. If passed nothing it silently returns.

Callers 12

ManageJobResourcesFunction · 0.95
HasAnyStringsFunction · 0.45
HasAllStringsFunction · 0.45
UniqueStringsFunction · 0.45
RemoveEmptiesAndUniqueFunction · 0.45
HasDuplicateStrFunction · 0.45
FindDuplicateStrsFunction · 0.45
TestAddFunction · 0.45
TestRemoveFunction · 0.45
TestSliceFunction · 0.45
TestMergeFunction · 0.45
NewFunction · 0.45

Calls

no outgoing calls

Tested by 4

TestAddFunction · 0.36
TestRemoveFunction · 0.36
TestSliceFunction · 0.36
TestMergeFunction · 0.36