mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-09-09 04:42:15 +00:00
code clean for if condtion (#1037)
Signed-off-by: yanggang <gang.yang@daocloud.io>
This commit is contained in:
@@ -875,7 +875,7 @@ func CmdDel(args *skel.CmdArgs, exec invoke.Exec, kubeClient *k8s.ClientInfo) er
|
||||
|
||||
// set CNIVersion in delegate CNI config if there is no CNIVersion and multus conf have CNIVersion.
|
||||
for _, v := range in.Delegates {
|
||||
if v.ConfListPlugin == true && v.ConfList.CNIVersion == "" && in.CNIVersion != "" {
|
||||
if v.ConfListPlugin && v.ConfList.CNIVersion == "" && in.CNIVersion != "" {
|
||||
v.ConfList.CNIVersion = in.CNIVersion
|
||||
v.Bytes, err = json.Marshal(v.ConfList)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user