diff options
author | Unknown <joe2010xtmf@163.com> | 2014-07-07 04:15:08 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-07-07 04:15:08 -0400 |
commit | 63cc14062a891a99a429f2eef0ee90a3f5795f47 (patch) | |
tree | 5149f44074323e55763a0ca4c880177399f74b06 /modules/base/tool.go | |
parent | 7ffdabb28f65b9e4414cd19c0c1f1a400b16b1f3 (diff) | |
download | gitea-63cc14062a891a99a429f2eef0ee90a3f5795f47.tar.gz gitea-63cc14062a891a99a429f2eef0ee90a3f5795f47.zip |
Paging function for users and repositories
Diffstat (limited to 'modules/base/tool.go')
-rw-r--r-- | modules/base/tool.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go index 5b066b2b9f..9635f13e0f 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -458,6 +458,16 @@ func (f StrTo) Int64() (int64, error) { return int64(v), err } +func (f StrTo) MustInt() int { + v, _ := f.Int() + return v +} + +func (f StrTo) MustInt64() int64 { + v, _ := f.Int64() + return v +} + func (f StrTo) String() string { if f.Exist() { return string(f) |