MCPcopy Create free account
hub / github.com/gogs/gogs / StringsToInt64s

Function StringsToInt64s

internal/tool/tool.go:351–357  ·  view source on GitHub ↗

StringsToInt64s converts a slice of string to a slice of int64.

(strs []string)

Source from the content-addressed store, hash-verified

349
350// StringsToInt64s converts a slice of string to a slice of int64.
351func 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.
360func Int64sToStrings(ints []int64) []string {

Callers 3

UpdateOrgProtectBranchFunction · 0.92
GetIssueStatsFunction · 0.92
ValidateRepoMetasFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected