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

Method parseString

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

Source from the content-addressed store, hash-verified

251}
252
253func (a OAuthAuthenticator) parseString(config map[string]interface{}, name string, envVarName string) (string, error) {
254 envVarValue := os.Getenv(envVarName)
255 if envVarValue != "" {
256 return envVarValue, nil
257 }
258 value := config[name]
259 result, valid := value.(string)
260 if value != nil && !valid {
261 return "", fmt.Errorf("Invalid value for %s: '%v'", name, value)
262 }
263 return result, nil
264}
265
266func (a OAuthAuthenticator) parseBool(config map[string]interface{}, name string, defaultValue bool) (bool, error) {
267 value := config[name]

Callers 1

getConfigMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected