Set will build a value that marshals to a JSON array
(v []string)
| 36 | |
| 37 | // Set will build a value that marshals to a JSON array |
| 38 | func 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 |