diff --git a/keyvalues.go b/keyvalues.go index e289e6e..8565c1f 100644 --- a/keyvalues.go +++ b/keyvalues.go @@ -493,6 +493,12 @@ func hasSubKeys(v interface{}, subkeys map[string]interface{}) bool { // Per: https://github.com/clbanning/mxj/issues/37#issuecomment-278651862 var subkeySep string = ":" +// SetSubkeyFieldSeparator changes the default field separator, ":", for optional +// subkey arguments in mv.ValuesForKey and mv.ValuesForPath. E.g., if the subkey +// value is "http://blah/blah", setting the field separator to "|" will allow +// the subkey specification, "|http://blah/blah" to parse properly. +// If called with no argument or an empty string value, the field separator is +// set to the default, ":". func SetSubkeyFieldSeparator(s ...string) { switch { case len(s) == 0: