MCPcopy Create free account
hub / github.com/Creatly/creatly-backend / parseConfigFile

Function parseConfigFile

internal/config/config.go:201–216  ·  view source on GitHub ↗
(folder, env string)

Source from the content-addressed store, hash-verified

199}
200
201func parseConfigFile(folder, env string) error {
202 viper.AddConfigPath(folder)
203 viper.SetConfigName("main")
204
205 if err := viper.ReadInConfig(); err != nil {
206 return err
207 }
208
209 if env == EnvLocal {
210 return nil
211 }
212
213 viper.SetConfigName(env)
214
215 return viper.MergeInConfig()
216}
217
218func populateDefaults() {
219 viper.SetDefault("http.port", defaultHTTPPort)

Callers 1

InitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected