Skip to content
Myr

cmd: Fix tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Albert Nigmatzianov · committed by Albert Nigmatzianov · parent defa97f · Browse files · 2 files+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−5 removed

  • other:+5 added−5 removed

2 files+5 added−5 removed

modified:cobra/cmd/testdata/root.go.golden+1 added-1 removed
46 unmodified lines
47 os.Exit(1)48 }49}5051func init() {51func init() { 52 cobra.OnInitialize(initConfig)5354 // Here you will define your flags and configuration settings.55 // Cobra supports persistent flags, which, if defined here,
33 unmodified lines
modified:cobra/cmd/init.go+4 added-4 removed
140 unmodified lines
141142import (143 "fmt"144 "os"145146 "github.com/spf13/cobra"{{if .viper}}147 "github.com/spf13/viper"145{{if .viper}}146 homedir "github.com/mitchellh/go-homedir"{{end}}147 "github.com/spf13/cobra"{{if .viper}}148 "github.com/spf13/viper"{{end}}149){{if .viper}}150151var cfgFile string{{end}}152
22 unmodified lines
175}176177func init() { {{if .viper}}178 cobra.OnInitialize(initConfig)179 {{end}}179{{end}}180 // Here you will define your flags and configuration settings.181 // Cobra supports persistent flags, which, if defined here,182 // will be global for your application.{{ if .viper }}183 RootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.{{ .appName }}.yaml)"){{ else }}
51 unmodified lines