1
0
Fork 0
forked from forgejo/forgejo

Add tests for StringsToInt64s() & Int64sToStrings()

This commit is contained in:
Matthias Loibl 2016-11-07 21:49:50 +01:00
parent b00d82d679
commit d417aedcfa
No known key found for this signature in database
GPG key ID: B1C7DF661ABB2C1A
2 changed files with 45 additions and 9 deletions

View file

@ -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
}