config_showyaml.go 489 B

123456789101112131415161718192021222324
  1. package main
  2. import (
  3. "fmt"
  4. "github.com/spf13/cobra"
  5. )
  6. func runConfigShowYAML(cmd *cobra.Command, args []string) error {
  7. fmt.Println(mergedConfig)
  8. return nil
  9. }
  10. func NewConfigShowYAMLCmd() *cobra.Command {
  11. cmdConfigShow := &cobra.Command{
  12. Use: "show-yaml",
  13. Short: "Displays merged config.yaml + config.yaml.local",
  14. Args: cobra.ExactArgs(0),
  15. DisableAutoGenTag: true,
  16. RunE: runConfigShowYAML,
  17. }
  18. return cmdConfigShow
  19. }