proxypool
proxypool copied to clipboard
go build 报错:pkg/storage/filter.go:90:15: undefined: RandInt
github.com/henson/proxypool/pkg/storage/filter.go # 122 添加缺省方法
//RandInt get the random numer in [min, max] func RandInt(min, max int) int { if min >= max || max == 0 { return max } rand.Seed(time.Now().UnixNano())
//x := r.Intn(max-min) + min
x := rand.Intn(max-min) + min
//fmt.Println("RandInt: = ",x)
return x
}
@lamplife 你的是什么系统呢。。 我这个RandInt(min, max int) int 已经在pkg/storage/rand_*.go里面定义了了 https://github.com/henson/proxypool/blob/0593b48ebd905f6c02c5e78cf5d97c41dee55fac/pkg/storage/rand_windows.go#L18
https://github.com/henson/proxypool/blob/0593b48ebd905f6c02c5e78cf5d97c41dee55fac/pkg/storage/rand_linux.go#L21
Mac darwin平台的解决方法我已经提交,等合并就可以解决了。