Skip to content

Commit

Permalink
Merge pull request #864 from tklauser/skel-superfluous-err-nil-check
Browse files Browse the repository at this point in the history
skel: remove superfluous err nil check in (*dispatcher).pluginMain
  • Loading branch information
mars1024 authored Nov 8, 2021
2 parents 6a92df8 + c362597 commit 1d9f32d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/skel/skel.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,7 @@ func (t *dispatcher) pluginMain(cmdAdd, cmdCheck, cmdDel func(_ *CmdArgs) error,
return types.NewError(types.ErrInvalidEnvironmentVariables, fmt.Sprintf("unknown CNI_COMMAND: %v", cmd), "")
}

if err != nil {
return err
}
return nil
return err
}

// PluginMainWithError is the core "main" for a plugin. It accepts
Expand Down

0 comments on commit 1d9f32d

Please sign in to comment.