mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
Merge pull request #97881 from ialidzhikov/nit/unnecessary-type-conversion
Nit: Remove unnecessary type conversion
This commit is contained in:
commit
90ac9cfc58
@ -286,12 +286,12 @@ func Match(ss *apps.StatefulSet, history *apps.ControllerRevision) (bool, error)
|
|||||||
// PodSpecTemplate. We can modify this later to encompass more state (or less) and remain compatible with previously
|
// PodSpecTemplate. We can modify this later to encompass more state (or less) and remain compatible with previously
|
||||||
// recorded patches.
|
// recorded patches.
|
||||||
func getPatch(set *apps.StatefulSet) ([]byte, error) {
|
func getPatch(set *apps.StatefulSet) ([]byte, error) {
|
||||||
str, err := runtime.Encode(patchCodec, set)
|
data, err := runtime.Encode(patchCodec, set)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
var raw map[string]interface{}
|
var raw map[string]interface{}
|
||||||
json.Unmarshal([]byte(str), &raw)
|
json.Unmarshal(data, &raw)
|
||||||
objCopy := make(map[string]interface{})
|
objCopy := make(map[string]interface{})
|
||||||
specCopy := make(map[string]interface{})
|
specCopy := make(map[string]interface{})
|
||||||
spec := raw["spec"].(map[string]interface{})
|
spec := raw["spec"].(map[string]interface{})
|
||||||
|
Loading…
Reference in New Issue
Block a user