mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 20:41:57 +00:00
performance close to handlers if no bindings but even if bindings except service (new feature is that we can bind functions as well) is x1.1 faster than the previous mvc implementation - make BaseController (so and C) optionally but not break the existing APIs that using iris.C or mvc.C
Former-commit-id: a26a8f836894c061e0f435df8ac1c2c534f0ee48
This commit is contained in:
@@ -25,6 +25,13 @@ type (
|
||||
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{} {
|
||||
switch k {
|
||||
case reflect.String:
|
||||
|
||||
Reference in New Issue
Block a user