Compare commits

...

2 Commits

Author SHA1 Message Date
lzf
4d51d0a1d0 update 2025-03-31 15:25:24 +08:00
lzf
b876f0bfa3 update 2025-03-31 15:24:36 +08:00

View File

@@ -4,6 +4,7 @@ import (
"errors"
"git.makemake.in/kzkzzzz/mycommon/mylog"
"log"
"math/rand/v2"
"net"
"os"
"runtime/debug"
@@ -26,6 +27,11 @@ func SafeGo(fn func()) {
}()
}
// RandRange [min, max] 左右均包含
func RandRange(min, max int) int {
return rand.IntN(max+1-min) + min
}
var (
getIpOnce = &sync.Once{}
outBoundIp = "127.0.0.1"