mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
fix breaking change
This commit is contained in:
parent
3c332a9487
commit
f55efb8dae
@ -94,7 +94,7 @@ func NewPathElement(s string) (fieldpath.PathElement, error) {
|
||||
})
|
||||
}
|
||||
return fieldpath.PathElement{
|
||||
Key: fields,
|
||||
Key: &value.Map{Items: fields},
|
||||
}, nil
|
||||
default:
|
||||
// Ignore unknown key types
|
||||
@ -107,9 +107,9 @@ func PathElementString(pe fieldpath.PathElement) (string, error) {
|
||||
switch {
|
||||
case pe.FieldName != nil:
|
||||
return Field + Separator + *pe.FieldName, nil
|
||||
case len(pe.Key) > 0:
|
||||
case pe.Key != nil:
|
||||
kv := map[string]json.RawMessage{}
|
||||
for _, k := range pe.Key {
|
||||
for _, k := range pe.Key.Items {
|
||||
b, err := k.Value.ToJSON()
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
Loading…
Reference in New Issue
Block a user