(invokedCommandName string)
| 131 | } |
| 132 | |
| 133 | func commandRequiresAuthentication(invokedCommandName string) bool { |
| 134 | commandsWithNoAuthRequired := []string{ |
| 135 | "auth0 completion", |
| 136 | "auth0 help", |
| 137 | "auth0 login", |
| 138 | "auth0 logout", |
| 139 | "auth0 tenants use", |
| 140 | "auth0 tenants list", |
| 141 | } |
| 142 | |
| 143 | for _, cmd := range commandsWithNoAuthRequired { |
| 144 | if cmd == invokedCommandName { |
| 145 | return false |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | return true |
| 150 | } |
| 151 | |
| 152 | func addPersistentFlags(rootCmd *cobra.Command, cli *cli) { |
| 153 | rootCmd.PersistentFlags().StringVar(&cli.tenant, |
no outgoing calls