(c *cli.Context)
| 118 | } |
| 119 | |
| 120 | func initConfig(c *cli.Context) error { |
| 121 | // Read configuration file configuration |
| 122 | viper.SetConfigFile(c.String("config")) |
| 123 | if err := viper.ReadInConfig(); err != nil { |
| 124 | return err |
| 125 | } |
| 126 | |
| 127 | // Map configuration file content to structure |
| 128 | err := config.InitConfig() |
| 129 | if err != nil { |
| 130 | return err |
| 131 | } |
| 132 | debug() |
| 133 | |
| 134 | return nil |
| 135 | } |
| 136 | |
| 137 | func debug() { |
| 138 | // Open pprof |
nothing calls this directly
no test coverage detected