MCPcopy
hub / github.com/tinylib/msgp / StringFromSlice

Function StringFromSlice

msgp/setof/generated.go:132–141  ·  view source on GitHub ↗

StringFromSlice creates a String from a slice.

(s []string)

Source from the content-addressed store, hash-verified

130
131// StringFromSlice creates a String from a slice.
132func StringFromSlice(s []string) String {
133 if s == nil {
134 return nil
135 }
136 dst := make(String, len(s))
137 for _, v := range s {
138 dst[v] = struct{}{}
139 }
140 return dst
141}
142
143// StringSorted is a set of strings that will be stored as an array.
144// Elements are sorted and the order of elements is guaranteed.

Callers 3

TestString_FromSliceFunction · 0.85
TestString_NilHandlingFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestString_FromSliceFunction · 0.68
TestString_NilHandlingFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…