MCPcopy Index your code
hub / github.com/git-lfs/git-lfs / NewStringSetFromSlice

Function NewStringSetFromSlice

tools/stringset.go:26–32  ·  view source on GitHub ↗

Creates and returns a reference to a set from an existing slice

(s []string)

Source from the content-addressed store, hash-verified

24
25// Creates and returns a reference to a set from an existing slice
26func NewStringSetFromSlice(s []string) StringSet {
27 a := NewStringSetWithCapacity(len(s))
28 for _, item := range s {
29 a.Add(item)
30 }
31 return a
32}
33
34// Adds an item to the current set if it doesn't already exist in the set.
35func (set StringSet) Add(i string) bool {

Callers 2

util.goFile · 0.92
ContainsAllMethod · 0.85

Calls 2

NewStringSetWithCapacityFunction · 0.85
AddMethod · 0.65

Tested by

no test coverage detected