MCPcopy Index your code
hub / github.com/devopsctl/gitlabctl / getCfg

Function getCfg

cmd/gitlab_client.go:87–93  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

85// in 'key=value' format or from any environment variable that starts
86// with 'GITLAB' as prefix; e.g: GITLAB_USERNAME
87func 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}

Callers 2

newGitlabClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected