MCPcopy
hub / github.com/minio/minio-go / Create

Function Create

pkg/set/set.go:175–181  ·  view source on GitHub ↗

Create - creates new set with given values.

(sl ...T)

Source from the content-addressed store, hash-verified

173
174// Create - creates new set with given values.
175func Create[T comparable](sl ...T) Set[T] {
176 set := make(Set[T], len(sl))
177 for _, k := range sl {
178 set.Add(k)
179 }
180 return set
181}
182
183// Copy - returns copy of given set.
184func Copy[T comparable](set Set[T]) Set[T] {

Callers 15

ExampleFunction · 0.92
ExampleSet_intSetFunction · 0.92
ExampleSet_stringSetFunction · 0.92
ExampleSet_float64SetFunction · 0.92
ExampleSet_ApplyFuncFunction · 0.92
ExampleSet_FuncMatchFunction · 0.92
ExampleCopyFunction · 0.92
ExampleSet_EqualsFunction · 0.92
ExampleSet_customTypeFunction · 0.92
ExampleToSliceOrderedFunction · 0.92
ExampleSet_ToSliceFunction · 0.92
ExampleCreateFunction · 0.92

Calls 1

AddMethod · 0.45

Tested by 15

ExampleFunction · 0.74
ExampleSet_intSetFunction · 0.74
ExampleSet_stringSetFunction · 0.74
ExampleSet_float64SetFunction · 0.74
ExampleSet_ApplyFuncFunction · 0.74
ExampleSet_FuncMatchFunction · 0.74
ExampleCopyFunction · 0.74
ExampleSet_EqualsFunction · 0.74
ExampleSet_customTypeFunction · 0.74
ExampleToSliceOrderedFunction · 0.74
ExampleSet_ToSliceFunction · 0.74
ExampleCreateFunction · 0.74