Nobody had ever created a function like this one before. (#26)

Reviewed-on: rrise/reloading-manager#26
Co-authored-by: Ron Rise <ron@siteworxpro.com>
Co-committed-by: Ron Rise <ron@siteworxpro.com>
This commit is contained in:
2025-04-18 17:30:11 -04:00
committed by Siteworx Pro Gitea
parent 1ae280d785
commit eaa9b97baa
41 changed files with 1159 additions and 88 deletions

View File

@@ -19,3 +19,12 @@ func ParseInt32WithDefault(s string, def int32) int32 {
return int32(sInt)
}
func ParseInt64OrDefault(s string, def int64) int64 {
sInt, err := strconv.ParseInt(s, 10, 64)
if err != nil {
return def
}
return sInt
}