GetFloat64Default same as `Get` but returns its float64 representation, if key doesn't exist then it returns the "defaultValue".
(key string, defaultValue float64)
| 429 | // GetFloat64Default same as `Get` but returns its float64 representation, |
| 430 | // if key doesn't exist then it returns the "defaultValue". |
| 431 | func (s *Session) GetFloat64Default(key string, defaultValue float64) float64 { |
| 432 | if v, err := s.GetFloat64(key); err == nil { |
| 433 | return v |
| 434 | } |
| 435 | |
| 436 | return defaultValue |
| 437 | } |
| 438 | |
| 439 | // GetBoolean same as `Get` but returns its boolean representation, |
| 440 | // if key doesn't exist then it returns false and a non-nil error. |