1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 12:57:05 +00:00

add uint8 parameter type, and mvc and hero - this commit may be a point of tutorial on how to add a completely new type from scratch to the hero for future contributors

Former-commit-id: dc7a7e6c97ef0c644a22e92072e4bdb98ae10582
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-08-24 00:56:54 +03:00
parent ef5f383227
commit cbd8fe95ac
12 changed files with 200 additions and 4 deletions

View File

@@ -162,7 +162,14 @@ func (r RequestParams) GetFloat64(key string) (float64, error) {
return r.store.GetFloat64(key)
}
// GetUint64 returns the path paramete's value as uint64, based on its key.
// GetUint8 returns the path parameter's value as uint8, based on its key.
// It checks for all available types of int, including int, string.
// It will return 0 and a non-nil error if parameter wasn't found.
func (r RequestParams) GetUint8(key string) (uint8, error) {
return r.store.GetUint8(key)
}
// GetUint64 returns the path parameter's value as uint64, based on its key.
// It checks for all available types of int, including int, uint64, int64, strings etc.
// It will return 0 and a non-nil error if parameter wasn't found.
func (r RequestParams) GetUint64(key string) (uint64, error) {