fix for int sep
This commit is contained in:
@@ -103,15 +103,9 @@ func filterStr(ss []string) []string {
|
|||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
func intSep(in, sep string) int {
|
func intSep(sep, in string) int {
|
||||||
if in == "" {
|
start, _, _ := strings.Cut(in, sep)
|
||||||
return 0
|
out, _ := strconv.Atoi(start)
|
||||||
}
|
|
||||||
start := strings.SplitN(in, sep, 2)[0]
|
|
||||||
out, err := strconv.Atoi(start)
|
|
||||||
if err != nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user