update go mod, fix possible typecasting issues
This commit is contained in:
@@ -65,3 +65,11 @@ func AnyPrefixes(s string, prefixes []string) string {
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
func SafeUint64(i int) uint64 {
|
||||
if i < 0 {
|
||||
log.Printf("Tried to cast %d to uint64", i)
|
||||
return 0
|
||||
}
|
||||
return uint64(i)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user