(cmd *cobra.Command)
| 167 | } |
| 168 | |
| 169 | func GetConfig(cmd *cobra.Command) *Config { |
| 170 | cfg := &Config{} |
| 171 | err := viper.Unmarshal(cfg) |
| 172 | if err != nil { |
| 173 | cmd.PrintErr("Configuration is malformed: " + err.Error()) |
| 174 | os.Exit(1) |
| 175 | } |
| 176 | |
| 177 | return cfg |
| 178 | } |
| 179 | |
| 180 | func GetInitConfig(cmd *cobra.Command, cfgPath *string) func() { |
| 181 | return func() { |
no outgoing calls
no test coverage detected