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

Method GetInt64Default

sessions/session.go:311–317  ·  view source on GitHub ↗

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

(key string, defaultValue int64)

Source from the content-addressed store, hash-verified

309// GetInt64Default same as `Get` but returns its int64 representation,
310// if key doesn't exist it returns the "defaultValue".
311func (s *Session) GetInt64Default(key string, defaultValue int64) int64 {
312 if v, err := s.GetInt64(key); err == nil {
313 return v
314 }
315
316 return defaultValue
317}
318
319// GetUint64 same as `Get` but returns as uint64,
320// if key doesn't exist then it returns 0 and a non-nil error.

Callers 8

PartialUpdateMethod · 0.45
DeleteMethod · 0.45
GetByIDMethod · 0.45
PartialUpdateMethod · 0.45
DeleteMethod · 0.45
ListProductsMethod · 0.45
InsertProductsMethod · 0.45
getCurrentUserIDMethod · 0.45

Calls 1

GetInt64Method · 0.95

Tested by

no test coverage detected