1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-10 05:25:58 +00:00
This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-01-09 05:41:20 +02:00
parent 72c2dafd2e
commit 8aedf6bc32
36 changed files with 99 additions and 130 deletions

View File

@@ -363,9 +363,6 @@ func (e Entry) UintDefault(def uint) (uint, error) {
if err != nil {
return def, err
}
if val > uint64(maxValue) {
return def, e.notFound(reflect.Uint)
}
return uint(val), nil
case uint:
return vv, nil
@@ -412,9 +409,6 @@ func (e Entry) Uint8Default(def uint8) (uint8, error) {
if err != nil {
return def, err
}
if val > math.MaxUint8 {
return def, e.notFound(reflect.Uint8)
}
return uint8(val), nil
case uint:
if vv > math.MaxUint8 {
@@ -462,9 +456,6 @@ func (e Entry) Uint16Default(def uint16) (uint16, error) {
if err != nil {
return def, err
}
if val > math.MaxUint16 {
return def, e.notFound(reflect.Uint16)
}
return uint16(val), nil
case uint:
if vv > math.MaxUint16 {
@@ -509,9 +500,6 @@ func (e Entry) Uint32Default(def uint32) (uint32, error) {
if err != nil {
return def, err
}
if val > math.MaxUint32 {
return def, e.notFound(reflect.Uint32)
}
return uint32(val), nil
case uint:
if vv > math.MaxUint32 {
@@ -555,9 +543,6 @@ func (e Entry) Uint64Default(def uint64) (uint64, error) {
if err != nil {
return def, err
}
if val > math.MaxUint64 {
return def, e.notFound(reflect.Uint64)
}
return uint64(val), nil
case uint8:
return uint64(vv), nil
@@ -590,9 +575,6 @@ func (e Entry) Float32Default(key string, def float32) (float32, error) {
if err != nil {
return def, err
}
if val > math.MaxFloat32 {
return def, e.notFound(reflect.Float32)
}
return float32(val), nil
case float32:
return vv, nil