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

Function IntFromSlice

msgp/setof/generated.go:404–413  ·  view source on GitHub ↗

IntFromSlice creates a Int from a slice.

(s []int)

Source from the content-addressed store, hash-verified

402
403// IntFromSlice creates a Int from a slice.
404func IntFromSlice(s []int) Int {
405 if s == nil {
406 return nil
407 }
408 dst := make(Int, len(s))
409 for _, v := range s {
410 dst[v] = struct{}{}
411 }
412 return dst
413}
414
415// IntSorted is a set of ints that will be stored as an array.
416// Elements are sorted and the order of elements is guaranteed.

Callers 3

TestInt_FromSliceFunction · 0.85
TestInt_NilHandlingFunction · 0.85
BenchmarkInt_FromSliceFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestInt_FromSliceFunction · 0.68
TestInt_NilHandlingFunction · 0.68
BenchmarkInt_FromSliceFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…