StringsToInt64s converts a slice of string to a slice of int64.
(strs []string)
| 349 | |
| 350 | // StringsToInt64s converts a slice of string to a slice of int64. |
| 351 | func StringsToInt64s(strs []string) []int64 { |
| 352 | ints := make([]int64, len(strs)) |
| 353 | for i := range strs { |
| 354 | ints[i] = com.StrTo(strs[i]).MustInt64() |
| 355 | } |
| 356 | return ints |
| 357 | } |
| 358 | |
| 359 | // Int64sToStrings converts a slice of int64 to a slice of string. |
| 360 | func Int64sToStrings(ints []int64) []string { |
no outgoing calls
no test coverage detected