Commit 1b785d09 authored by zhangxiaoyu-zidif's avatar zhangxiaoyu-zidif

Delete redundant err definition

parent 5529d01a
...@@ -638,7 +638,6 @@ func (o *DrainOptions) RunCordonOrUncordon(desired bool) error { ...@@ -638,7 +638,6 @@ func (o *DrainOptions) RunCordonOrUncordon(desired bool) error {
} else { } else {
helper := resource.NewHelper(o.restClient, o.nodeInfo.Mapping) helper := resource.NewHelper(o.restClient, o.nodeInfo.Mapping)
node.Spec.Unschedulable = desired node.Spec.Unschedulable = desired
var err error
newData, err := json.Marshal(obj) newData, err := json.Marshal(obj)
patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, obj) patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, obj)
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment