in path.go [69:88]
func parsePath(in, sep string, maxIdx int64, enableNumKeys, allowEscapePath bool) cfgPath {
if sep == "" || (allowEscapePath && escapePathReg.MatchString(in)) {
return cfgPath{
sep: sep,
fields: []field{parseField(in, maxIdx, enableNumKeys)},
}
}
elems := strings.Split(in, sep)
fields := make([]field, 0, len(elems))
// If property is the name with separators, for example "inputs.0.i"
// fall back to original implementation
if len(elems) > 1 {
enableNumKeys = false
}
for _, elem := range elems {
fields = append(fields, parseField(elem, maxIdx, enableNumKeys))
}
return cfgPath{fields: fields, sep: sep}
}