MCPcopy
hub / github.com/kubernetes/kops / Set

Function Set

pkg/util/stringorset/stringorset.go:38–42  ·  view source on GitHub ↗

Set will build a value that marshals to a JSON array

(v []string)

Source from the content-addressed store, hash-verified

36
37// Set will build a value that marshals to a JSON array
38func Set(v []string) StringOrSet {
39 values := sets.Set[string]{}
40 values.Insert(v...)
41 return StringOrSet{values: values, forceEncodeAsArray: true}
42}
43
44// Of will build a value that marshals to a JSON array if len(v) > 1,
45// otherwise to a single string

Callers 10

AddEC2CreateActionMethod · 0.92
AddS3PermissionsMethod · 0.92
buildS3GetStatementsMethod · 0.92
addSnapshotPersmissionsFunction · 0.92
TestRoundTripFunction · 0.85

Calls 1

InsertMethod · 0.65

Tested by 1

TestRoundTripFunction · 0.68