diff --git a/cmd/common.go b/cmd/common.go index 3d003a9..d47b678 100644 --- a/cmd/common.go +++ b/cmd/common.go @@ -1,6 +1,7 @@ package cmd import ( + "errors" "fmt" "os" "strings" @@ -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 { diff --git a/main.go b/main.go index 23f379c..d4ae9c4 100644 --- a/main.go +++ b/main.go @@ -7,7 +7,7 @@ import ( "github.com/bitnami/gonit/cmd" ) -var version = "0.2.10" +var version = "0.2.11" var buildDate = "" var commit = ""