mirror of
https://github.com/foomo/squadron.git
synced 2026-10-07 08:06:55 +00:00
refactor: add errors
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
package actions
|
||||
|
||||
import (
|
||||
"gopkg.in/errgo.v2/fmt/errors"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/foomo/squadron"
|
||||
"github.com/foomo/squadron/util"
|
||||
@@ -79,7 +79,7 @@ func parseUnitArgs(args []string, units map[string]squadron.Unit) (map[string]sq
|
||||
if unit, ok := units[arg]; ok {
|
||||
ret[arg] = unit
|
||||
} else {
|
||||
return nil, errors.Newf("unknown unit name %s", arg)
|
||||
return nil, errors.Errorf("unknown unit name %s", arg)
|
||||
}
|
||||
}
|
||||
return ret, nil
|
||||
|
||||
@@ -6,6 +6,7 @@ require (
|
||||
github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 // indirect
|
||||
github.com/foomo/config-bob v0.5.1
|
||||
github.com/miracl/conflate v1.2.1
|
||||
github.com/pkg/errors v0.8.1
|
||||
github.com/sirupsen/logrus v1.6.0
|
||||
github.com/spf13/cobra v1.1.3
|
||||
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 // indirect
|
||||
|
||||
@@ -178,6 +178,7 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa
|
||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
|
||||
Reference in New Issue
Block a user