*: fix some lint issues

Mostly gathered these using golangci-lint's deadcode and ineffassign
linters.

Signed-off-by: Stephan Renatus <srenatus@chef.io>
This commit is contained in:
Stephan Renatus
2019-07-30 11:08:57 +02:00
parent 72f5596671
commit d9487e553b
13 changed files with 12 additions and 60 deletions

View File

@@ -136,7 +136,7 @@ func serve(cmd *cobra.Command, args []string) error {
if err != nil {
return fmt.Errorf("invalid config: reading from client CA file: %v", err)
}
if cPool.AppendCertsFromPEM(clientCert) != true {
if !cPool.AppendCertsFromPEM(clientCert) {
return errors.New("invalid config: failed to parse client CA")
}