Skip to content

Commit

Permalink
Merge pull request #53 from bitnami/Lint-error
Browse files Browse the repository at this point in the history
Fix linter error SCC-SA1006
  • Loading branch information
dgomezleon authored Aug 26, 2024
2 parents 9182c9b + 5f0c421 commit 9154767
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 9154767

Please sign in to comment.