mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-15 05:43:56 +02:00
* refact "cscli decisions import" * cobra.ExactArgs(0) -> cobra.NoArgs * refact cscli bouncers * refact cscli machines * refact "cscli lapi" * lint
26 lines
490 B
Go
26 lines
490 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func (cli *cliConfig) showYAML() error {
|
|
fmt.Println(mergedConfig)
|
|
return nil
|
|
}
|
|
|
|
func (cli *cliConfig) newShowYAMLCmd() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "show-yaml",
|
|
Short: "Displays merged config.yaml + config.yaml.local",
|
|
Args: cobra.NoArgs,
|
|
DisableAutoGenTag: true,
|
|
RunE: func(_ *cobra.Command, _ []string) error {
|
|
return cli.showYAML()
|
|
},
|
|
}
|
|
|
|
return cmd
|
|
}
|