Skip to content

Commit

Permalink
add documentation for SetSubkeyFieldSeparator
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Banning committed Feb 9, 2017
1 parent 6e78033 commit c70b6c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions keyvalues.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<key>|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:
Expand Down

0 comments on commit c70b6c3

Please sign in to comment.