GetIntPtr returns a config value as an int pointer.
(ns, key string)
| 398 | |
| 399 | // GetIntPtr returns a config value as an int pointer. |
| 400 | func (c *LiveConfig) GetIntPtr(ns, key string) (*int, error) { |
| 401 | nskey := nskey(ns, key) |
| 402 | |
| 403 | if !c.IsSet(key) { |
| 404 | if isRequired(nskey) { |
| 405 | return nil, NewMissingArgsErr(nskey) |
| 406 | } |
| 407 | return nil, nil |
| 408 | } |
| 409 | val := viper.GetInt(nskey) |
| 410 | return &val, nil |
| 411 | } |
| 412 | |
| 413 | // GetFloat64 returns a config value as a float64. |
| 414 | func (c *LiveConfig) GetFloat64(ns, key string) (float64, error) { |
nothing calls this directly
no test coverage detected