github.com/crowdsecurity/crowdsec@v1.6.1/cmd/crowdsec-cli/config_showyaml.go (about) 1 package main 2 3 import ( 4 "fmt" 5 6 "github.com/spf13/cobra" 7 ) 8 9 func (cli *cliConfig) showYAML() error { 10 fmt.Println(mergedConfig) 11 return nil 12 } 13 14 func (cli *cliConfig) newShowYAMLCmd() *cobra.Command { 15 cmd := &cobra.Command{ 16 Use: "show-yaml", 17 Short: "Displays merged config.yaml + config.yaml.local", 18 Args: cobra.ExactArgs(0), 19 DisableAutoGenTag: true, 20 RunE: func(_ *cobra.Command, _ []string) error { 21 return cli.showYAML() 22 }, 23 } 24 25 return cmd 26 }