MCPcopy Create free account
hub / github.com/kataras/iris / GetFloat64Default

Method GetFloat64Default

sessions/session.go:431–437  ·  view source on GitHub ↗

GetFloat64Default same as `Get` but returns its float64 representation, if key doesn't exist then it returns the "defaultValue".

(key string, defaultValue float64)

Source from the content-addressed store, hash-verified

429// GetFloat64Default same as `Get` but returns its float64 representation,
430// if key doesn't exist then it returns the "defaultValue".
431func (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.

Callers 1

NewAppFunction · 0.45

Calls 1

GetFloat64Method · 0.95

Tested by

no test coverage detected