You've already forked reloading-manager
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user