mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +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{
|
return fieldpath.PathElement{
|
||||||
Key: fields,
|
Key: &value.Map{Items: fields},
|
||||||
}, nil
|
}, nil
|
||||||
default:
|
default:
|
||||||
// Ignore unknown key types
|
// Ignore unknown key types
|
||||||
@ -107,9 +107,9 @@ func PathElementString(pe fieldpath.PathElement) (string, error) {
|
|||||||
switch {
|
switch {
|
||||||
case pe.FieldName != nil:
|
case pe.FieldName != nil:
|
||||||
return Field + Separator + *pe.FieldName, nil
|
return Field + Separator + *pe.FieldName, nil
|
||||||
case len(pe.Key) > 0:
|
case pe.Key != nil:
|
||||||
kv := map[string]json.RawMessage{}
|
kv := map[string]json.RawMessage{}
|
||||||
for _, k := range pe.Key {
|
for _, k := range pe.Key.Items {
|
||||||
b, err := k.Value.ToJSON()
|
b, err := k.Value.ToJSON()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
Loading…
Reference in New Issue
Block a user