Skip to content

Commit

Permalink
skel: remove superfluous err nil check in (*dispatcher).pluginMain
Browse files Browse the repository at this point in the history
There is no need to check err against nil, just return it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  • Loading branch information
tklauser committed Oct 25, 2021
1 parent 6a92df8 commit c362597
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 c362597

Please sign in to comment.