StringArray is a slices of strings, but also accepts a single string as a value when JSON unmarshaling, converting it to a slice of one string.
| 172 | // a single string as a value when JSON unmarshaling, |
| 173 | // converting it to a slice of one string. |
| 174 | type StringArray []string |
| 175 | |
| 176 | // UnmarshalJSON satisfies json.Unmarshaler. |
| 177 | func (sa *StringArray) UnmarshalJSON(b []byte) error { |