make error more clear
parent
abcf8561ff
commit
efccae0782
9
main.go
9
main.go
|
@ -65,10 +65,13 @@ func main() {
|
||||||
|
|
||||||
func run(c *cli.Context) error {
|
func run(c *cli.Context) error {
|
||||||
user := c.String("username")
|
user := c.String("username")
|
||||||
pass := c.String("password")
|
if user == "" {
|
||||||
|
return errors.New("username required")
|
||||||
|
}
|
||||||
|
|
||||||
if user == "" || pass == "" {
|
pass := c.String("password")
|
||||||
return errors.New("username and password required")
|
if pass == "" {
|
||||||
|
return errors.New("password required")
|
||||||
}
|
}
|
||||||
|
|
||||||
reg, err := name.NewRegistry(c.String("registry"))
|
reg, err := name.NewRegistry(c.String("registry"))
|
||||||
|
|
Loading…
Reference in New Issue