mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
AtomicUpdate should use api.Encode
This commit is contained in:
parent
6dd1e9cbb5
commit
a3771c9042
@ -17,7 +17,6 @@ limitations under the License.
|
||||
package tools
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
@ -225,7 +224,7 @@ func (h *EtcdHelper) AtomicUpdate(key string, ptrToType interface{}, tryUpdate E
|
||||
return h.SetObj(key, ret)
|
||||
}
|
||||
|
||||
data, err := json.Marshal(ret)
|
||||
data, err := api.Encode(ret)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user