MCPcopy Create free account
hub / github.com/UiPath/uipathcli / parseRequiredString

Method parseRequiredString

auth/oauth_authenticator.go:279–290  ·  view source on GitHub ↗
(config map[string]interface{}, name string, envVarName string)

Source from the content-addressed store, hash-verified

277}
278
279func (a OAuthAuthenticator) parseRequiredString(config map[string]interface{}, name string, envVarName string) (string, error) {
280 envVarValue := os.Getenv(envVarName)
281 if envVarValue != "" {
282 return envVarValue, nil
283 }
284 value := config[name]
285 result, valid := value.(string)
286 if !valid || result == "" {
287 return "", fmt.Errorf("Invalid value for %s: '%v'", name, value)
288 }
289 return result, nil
290}
291
292func (a OAuthAuthenticator) showBrowserLink(url string) {
293 fmt.Fprintln(os.Stderr, "Go to URL and perform login:\n"+url)

Callers 1

getConfigMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected