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 {
|
||||
user := c.String("username")
|
||||
pass := c.String("password")
|
||||
if user == "" {
|
||||
return errors.New("username required")
|
||||
}
|
||||
|
||||
if user == "" || pass == "" {
|
||||
return errors.New("username and password required")
|
||||
pass := c.String("password")
|
||||
if pass == "" {
|
||||
return errors.New("password required")
|
||||
}
|
||||
|
||||
reg, err := name.NewRegistry(c.String("registry"))
|
||||
|
|
Loading…
Reference in New Issue