mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
add comment doc on the core/memstore.go#Entry##GetByKindOrNil
Former-commit-id: 8e5f0132ace95088a7cdca05b923773369116ad4
This commit is contained in:
parent
e4ed775ce0
commit
93b037737c
|
@ -25,6 +25,13 @@ type (
|
||||||
Store []Entry
|
Store []Entry
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// GetByKindOrNil will try to get this entry's value of "k" kind,
|
||||||
|
// if value is not that kind it will NOT try to convert it the "k", instead
|
||||||
|
// it will return nil, except if boolean; then it will return false
|
||||||
|
// even if the value was not bool.
|
||||||
|
//
|
||||||
|
// If the "k" kind is not a string or int or int64 or bool
|
||||||
|
// then it will return the raw value of the entry as it's.
|
||||||
func (e Entry) GetByKindOrNil(k reflect.Kind) interface{} {
|
func (e Entry) GetByKindOrNil(k reflect.Kind) interface{} {
|
||||||
switch k {
|
switch k {
|
||||||
case reflect.String:
|
case reflect.String:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user