GetInt returns a config value as an int.
(ns, key string)
| 387 | |
| 388 | // GetInt returns a config value as an int. |
| 389 | func (c *LiveConfig) GetInt(ns, key string) (int, error) { |
| 390 | nskey := nskey(ns, key) |
| 391 | val := viper.GetInt(nskey) |
| 392 | |
| 393 | if isRequired(nskey) && val == 0 { |
| 394 | return 0, NewMissingArgsErr(nskey) |
| 395 | } |
| 396 | return val, nil |
| 397 | } |
| 398 | |
| 399 | // GetIntPtr returns a config value as an int pointer. |
| 400 | func (c *LiveConfig) GetIntPtr(ns, key string) (*int, error) { |
nothing calls this directly
no test coverage detected