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

Method parseBool

auth/oauth_authenticator.go:266–277  ·  view source on GitHub ↗
(config map[string]interface{}, name string, defaultValue bool)

Source from the content-addressed store, hash-verified

264}
265
266func (a OAuthAuthenticator) parseBool(config map[string]interface{}, name string, defaultValue bool) (bool, error) {
267 value := config[name]
268 if value == nil {
269 return defaultValue, nil
270 }
271
272 result, valid := value.(bool)
273 if value != nil && !valid {
274 return false, fmt.Errorf("Invalid value for %s: '%v'", name, value)
275 }
276 return result, nil
277}
278
279func (a OAuthAuthenticator) parseRequiredString(config map[string]interface{}, name string, envVarName string) (string, error) {
280 envVarValue := os.Getenv(envVarName)

Callers 1

getConfigMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected