diff options
author | Matthias Loibl <mail@matthiasloibl.com> | 2016-11-07 21:49:50 +0100 |
---|---|---|
committer | Matthias Loibl <mail@matthiasloibl.com> | 2016-11-07 23:31:40 +0100 |
commit | d417aedcfac506674a5690c360e746ad17b366a6 (patch) | |
tree | 077120408fba5de5d55cef99a5f4ce47e3f779c4 /modules/base/tool.go | |
parent | b00d82d67902b03298aedf6828b0c738398153a7 (diff) | |
download | gitea-d417aedcfac506674a5690c360e746ad17b366a6.tar.gz gitea-d417aedcfac506674a5690c360e746ad17b366a6.zip |
Add tests for StringsToInt64s() & Int64sToStrings()
Diffstat (limited to 'modules/base/tool.go')
-rw-r--r-- | modules/base/tool.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go index ab45dbae2f..209ff0a9cb 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -16,6 +16,7 @@ import ( "html/template" "math" "net/http" + "strconv" "strings" "time" "unicode" @@ -491,7 +492,7 @@ func StringsToInt64s(strs []string) []int64 { func Int64sToStrings(ints []int64) []string { strs := make([]string, len(ints)) for i := range ints { - strs[i] = com.ToStr(ints[i]) + strs[i] = strconv.FormatInt(ints[i], 10) } return strs } |