Fixed new gometalinter issues

This commit is contained in:
Torkel Ödegaard
2019-01-07 11:01:31 +01:00
parent cfa3e05eee
commit 0a936a55b4
2 changed files with 24 additions and 33 deletions

View File

@@ -78,14 +78,14 @@ func GetUserLoginAttemptCount(query *m.GetUserLoginAttemptCountQuery) error {
}
func toInt64(i interface{}) int64 {
switch i.(type) {
switch i := i.(type) {
case []byte:
n, _ := strconv.ParseInt(string(i.([]byte)), 10, 64)
n, _ := strconv.ParseInt(string(i), 10, 64)
return n
case int:
return int64(i.(int))
return int64(i)
case int64:
return i.(int64)
return i
}
return 0
}