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

Function StringSortedFromSlice

msgp/setof/generated.go:275–284  ·  view source on GitHub ↗

StringSortedFromSlice creates a StringSorted from a slice.

(s []string)

Source from the content-addressed store, hash-verified

273
274// StringSortedFromSlice creates a StringSorted from a slice.
275func StringSortedFromSlice(s []string) StringSorted {
276 if s == nil {
277 return nil
278 }
279 dst := make(StringSorted, len(s))
280 for _, v := range s {
281 dst[v] = struct{}{}
282 }
283 return dst
284}
285
286// Int is a set of ints that will be stored as an array.
287// Elements are not sorted and the order of elements is not guaranteed.

Callers 3

Calls

no outgoing calls

Tested by 3

Used in the wild real call sites across dependent graphs

searching dependent graphs…