DisableAuthCheck marks a command (and all its children) as not requiring auth.
(cmd *cobra.Command)
| 31 | |
| 32 | // DisableAuthCheck marks a command (and all its children) as not requiring auth. |
| 33 | func DisableAuthCheck(cmd *cobra.Command) { |
| 34 | if cmd.Annotations == nil { |
| 35 | cmd.Annotations = map[string]string{} |
| 36 | } |
| 37 | cmd.Annotations[skipAuthCheckKey] = "true" |
| 38 | } |
| 39 | |
| 40 | // IsAuthCheckDisabled returns true if the command or any ancestor has auth check disabled. |
| 41 | func IsAuthCheckDisabled(cmd *cobra.Command) bool { |
no outgoing calls