Files
2026-07-16 22:16:45 +07:00

15 lines
184 B
Go

package handlers
import "strconv"
func parseIntDefault(v string, def int) int {
if v == "" {
return def
}
n, err := strconv.Atoi(v)
if err != nil {
return def
}
return n
}