getCfg retrieves the value of a token from the config '--config' file in 'key=value' format or from any environment variable that starts with 'GITLAB' as prefix; e.g: GITLAB_USERNAME
(e string)
| 85 | // in 'key=value' format or from any environment variable that starts |
| 86 | // with 'GITLAB' as prefix; e.g: GITLAB_USERNAME |
| 87 | func getCfg(e string) string { |
| 88 | viper.SetEnvPrefix("GITLAB") |
| 89 | if err := viper.BindEnv(e); err != nil { |
| 90 | panic(err) |
| 91 | } |
| 92 | return viper.GetString(e) |
| 93 | } |
no outgoing calls
no test coverage detected