more concise validation

Co-authored-by: Djordje Lukic <djordje.lukic@docker.com>
This commit is contained in:
Guillaume Tardif 2020-08-11 13:45:46 +02:00 committed by GitHub
parent ec5f4e9202
commit 6ff20cf104
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -14,8 +14,7 @@ func AzureLoginCommand() *cobra.Command {
Short: "Log in to azure", Short: "Log in to azure",
Args: cobra.MaximumNArgs(0), Args: cobra.MaximumNArgs(0),
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
err := opts.Validate() if err := opts.Validate(); err != nil {
if err != nil {
return err return err
} }
return cloudLogin(cmd, "aci", opts) return cloudLogin(cmd, "aci", opts)