MCPcopy Create free account
hub / github.com/stretchr/objx / SetURLValuesSliceKeySuffix

Function SetURLValuesSliceKeySuffix

conversions.go:39–46  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
39func 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

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…