configCommand wires `cam config `. Two modes: 1. Legacy CAM-config mode: `--config ` (without `--app`) operates on the YAML/JSON/TOML file at that path. 2. Editor mode: `--app ` operates on the per-editor config files through the editorconfig.Registry.
(state *globalState)
| 24 | // 2. Editor mode: `--app <editor>` operates on the per-editor config files |
| 25 | // through the editorconfig.Registry. |
| 26 | func (a *App) configCommand(state *globalState) *cobra.Command { |
| 27 | cmd := &cobra.Command{ |
| 28 | Use: "config", |
| 29 | Aliases: []string{"cf"}, |
| 30 | Short: "Manage CAM and editor configuration files", |
| 31 | } |
| 32 | cmd.AddCommand(a.configListCommand(state)) |
| 33 | cmd.AddCommand(a.configValidateCommand(state)) |
| 34 | cmd.AddCommand(a.configShowCommand(state)) |
| 35 | cmd.AddCommand(a.configSetCommand(state)) |
| 36 | cmd.AddCommand(a.configUnsetCommand(state)) |
| 37 | return cmd |
| 38 | } |
| 39 | |
| 40 | func (a *App) configListCommand(state *globalState) *cobra.Command { |
| 41 | return &cobra.Command{ |
no test coverage detected