(state *globalState)
| 82 | } |
| 83 | |
| 84 | func (a *App) configValidateCommand(state *globalState) *cobra.Command { |
| 85 | return &cobra.Command{ |
| 86 | Use: "validate", |
| 87 | Short: "Validate configuration", |
| 88 | Args: cobra.NoArgs, |
| 89 | RunE: func(cmd *cobra.Command, args []string) error { |
| 90 | if state.configPath != "" { |
| 91 | if _, err := loadConfigFile(state.configPath); err != nil { |
| 92 | return err |
| 93 | } |
| 94 | } |
| 95 | fmt.Fprintln(cmd.OutOrStdout(), "Configuration is valid") |
| 96 | return nil |
| 97 | }, |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | func (a *App) configShowCommand(state *globalState) *cobra.Command { |
| 102 | var app string |
no test coverage detected