()
| 39 | } |
| 40 | |
| 41 | func GetCFConfig() (*Config, error) { |
| 42 | cfConfig, configErr := LoadConfig() |
| 43 | if configErr != nil { |
| 44 | if _, ok := configErr.(translatableerror.EmptyConfigError); !ok { |
| 45 | return nil, configErr |
| 46 | } |
| 47 | } |
| 48 | return cfConfig, nil |
| 49 | } |
| 50 | |
| 51 | // LoadConfig loads the config from the .cf/config.json and os.ENV. If the |
| 52 | // config.json does not exists, it will use a default config in its place. |
no test coverage detected