SetURLValuesSliceKeySuffix sets the character that is used to specify a suffix for slices parsed by URLValues. If the suffix is set to "[i]", then the index of the slice is used in place of i Ex: Suffix "[]" would have the form a[]=b&a[]=c OR Suffix "[i]" would have the form a[0]=b&a[1]=c OR Suffix
(s string)
| 37 | // OR Suffix "[i]" would have the form a[0]=b&a[1]=c |
| 38 | // OR Suffix "" would have the form a=b&a=c |
| 39 | func SetURLValuesSliceKeySuffix(s string) error { |
| 40 | if s == URLValuesSliceKeySuffixEmpty || s == URLValuesSliceKeySuffixArray || s == URLValuesSliceKeySuffixIndex { |
| 41 | urlValuesSliceKeySuffix = s |
| 42 | return nil |
| 43 | } |
| 44 | |
| 45 | return errors.New("objx: Invalid URLValuesSliceKeySuffix provided.") |
| 46 | } |
| 47 | |
| 48 | // JSON converts the contained object to a JSON string |
| 49 | // representation |
no outgoing calls
searching dependent graphs…