func (e PathElement) String() string {
	switch {
	case e.FieldName != nil:
		return "." + *e.FieldName
	case e.Key != nil:
		strs := make([]string, len(*e.Key))
		for i, k := range *e.Key {
			strs[i] = fmt.Sprintf("%v=%v", k.Name, value.ToString(k.Value))
		}
		// Keys are supposed to be sorted.
		return "[" + strings.Join(strs, ",") + "]"
	case e.Value != nil:
		return fmt.Sprintf("[=%v]", value.ToString(*e.Value))
	case e.Index != nil:
		return fmt.Sprintf("[%v]", *e.Index)
	default:
		return "{{invalid path element}}"
	}
}
// String presents the path element as a human-readable string.
String presents the path element as a human-readable string.
// String presents the path element as a human - readable string .
func (e PathElement) String() string {
	switch {
	case e.FieldName != nil:
		return "." + *e.FieldName
	case e.Key != nil:
		strs := make([]string, len(*e.Key))
		for i, k := range *e.Key {
			strs[i] = fmt.Sprintf("%v=%v", k.Name, value.ToString(k.Value))
		}
		return "[" + strings.Join(strs, ",") + "]"
	case e.Value != nil:
		return fmt.Sprintf("[=%v]", value.ToString(*e.Value))
	case e.Index != nil:
		return fmt.Sprintf("[%v]", *e.Index)
	default:
		return "{{invalid path element}}"
	}
}
func ( e PathElement ) String ( ) string { switch { case e . FieldName != nil : return " " + * e . FieldName case e . Key != nil : strs := make ( [ ] string , len ( * e . Key ) ) for i , k := range * e . Key { strs [ i ] = fmt . Sprintf ( " " , k . Name , value . ToString ( k . Value ) ) } return " " + strings . Join ( strs , " " ) + " " case e . Value != nil : return fmt . Sprintf ( " " , value . ToString ( * e . Value ) ) case e . Index != nil : return fmt . Sprintf ( " " , * e . Index ) default : return " " } }
String presents the path element as a human-readable string.
String presents the path element as a human - readable string .
// Keys are supposed to be sorted.