Skip to content

Commit

Permalink
Fix linter error SCC-SA1006
Browse files Browse the repository at this point in the history
Signed-off-by: David Gomez <dgomezleon@vmware.com>
  • Loading branch information
dgomezleon committed Aug 26, 2024
1 parent 9182c9b commit 5f0c421
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions cmd/common.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cmd

import (
"errors"
"fmt"
"os"
"strings"
Expand Down Expand Up @@ -160,15 +161,15 @@ func getChecksManager() interface {
}
return manager
}
func flattenErrors(errors []error) error {
if len(errors) == 0 {
func flattenErrors(errList []error) error {
if len(errList) == 0 {
return nil
}
msgs := []string{}
for _, err := range errors {
for _, err := range errList {
msgs = append(msgs, err.Error())
}
return fmt.Errorf(strings.Join(msgs, "\n"))
return errors.New(strings.Join(msgs, "\n"))
}

type serviceCommand struct {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/bitnami/gonit/cmd"
)

var version = "0.2.10"
var version = "0.2.11"
var buildDate = ""
var commit = ""

Expand Down

0 comments on commit 5f0c421

Please sign in to comment.