GetString returns a config value as a string.
(ns, key string)
| 362 | |
| 363 | // GetString returns a config value as a string. |
| 364 | func (c *LiveConfig) GetString(ns, key string) (string, error) { |
| 365 | nskey := nskey(ns, key) |
| 366 | str := viper.GetString(nskey) |
| 367 | |
| 368 | if isRequired(nskey) && strings.TrimSpace(str) == "" { |
| 369 | return "", NewMissingArgsErr(nskey) |
| 370 | } |
| 371 | return str, nil |
| 372 | } |
| 373 | |
| 374 | // GetBool returns a config value as a bool. |
| 375 | func (c *LiveConfig) GetBool(ns, key string) (bool, error) { |
nothing calls this directly
no test coverage detected