proxypool icon indicating copy to clipboard operation
proxypool copied to clipboard

go build 报错:pkg/storage/filter.go:90:15: undefined: RandInt

Open lamplife opened this issue 5 years ago • 2 comments

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 avatar Dec 26 '18 07:12 lamplife

@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

sndnvaps avatar Jan 25 '19 14:01 sndnvaps

Mac darwin平台的解决方法我已经提交,等合并就可以解决了。

sndnvaps avatar Jan 29 '19 02:01 sndnvaps