Skip to content

Commit

Permalink
Remove unused const
Browse files Browse the repository at this point in the history
  • Loading branch information
Widcket committed Mar 6, 2021
1 parent f1ffecd commit ce9fc3b
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions internal/cli/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const (
appName = "name"
appType = "type"
appDescription = "description"
appCallback = "callbacks"
)

func appsCmd(cli *cli) *cobra.Command {
Expand Down Expand Up @@ -91,7 +90,7 @@ auth0 apps show <id>
return fmt.Errorf("An unexpected error occurred: %w", err)
}
} else {
return errors.New("Please provide an application id")
return errors.New("Please provide an application Id")
}
} else {
inputs.ID = args[0]
Expand All @@ -106,7 +105,7 @@ auth0 apps show <id>
})

if err != nil {
return fmt.Errorf("Unable to load application. The id %v specified doesn't exist", inputs.ID)
return fmt.Errorf("Unable to load application. The Id %v specified doesn't exist", inputs.ID)
}

revealClientSecret := auth0.StringValue(a.AppType) != "native" && auth0.StringValue(a.AppType) != "spa"
Expand Down Expand Up @@ -143,7 +142,7 @@ auth0 apps delete <id>
return fmt.Errorf("An unexpected error occurred: %w", err)
}
} else {
return errors.New("Please provide an application id")
return errors.New("Please provide an application Id")
}
} else {
inputs.ID = args[0]
Expand Down Expand Up @@ -311,7 +310,7 @@ auth0 apps update <id> --name myapp --type [native|spa|regular|m2m]
return fmt.Errorf("An unexpected error occurred: %w", err)
}
} else {
return errors.New("Please provide an application id")
return errors.New("Please provide an application Id")
}
} else {
inputs.ID = args[0]
Expand Down Expand Up @@ -359,11 +358,11 @@ auth0 apps update <id> --name myapp --type [native|spa|regular|m2m]

a := &management.Client{}

updateErr := ansi.Spinner("Updating application", func() error {
current, readErr := cli.api.Client.Read(inputs.ID)
err := ansi.Spinner("Updating application", func() error {
current, err := cli.api.Client.Read(inputs.ID)

if readErr != nil {
return fmt.Errorf("Unable to load application. The id %v specified doesn't exist", inputs.ID)
if err != nil {
return fmt.Errorf("Unable to load application. The Id %v specified doesn't exist", inputs.ID)
}

if len(inputs.Name) == 0 {
Expand Down Expand Up @@ -427,8 +426,8 @@ auth0 apps update <id> --name myapp --type [native|spa|regular|m2m]
return cli.api.Client.Update(inputs.ID, a)
})

if updateErr != nil {
return fmt.Errorf("Unable to update application %v: %v", inputs.ID, updateErr)
if err != nil {
return fmt.Errorf("Unable to update application %v: %v", inputs.ID, err)
}

revealClientSecret := auth0.StringValue(a.AppType) != "native" && auth0.StringValue(a.AppType) != "spa"
Expand Down

0 comments on commit ce9fc3b

Please sign in to comment.