beefsack/go-rate

Package name

GeertJohan opened this issue · 1 comments

Hi,

Do you think the package name can be changed?
An underscore in the package name is not very conventional. golint mentions it too. This package is still young; changing it now is easy. And although it might break code for some users, fixing it is easy. It's better to change it now than later, when this package is probably in use by a lot of parties.

I think a package name such as rate or ratelimiter is great.

golint output:

rate_limiter.go:1:1: don't use an underscore in package name
rate_limiter_test.go:1:1: don't use an underscore in package name
rate_limiter_test.go:8:6: don't use underscores in Go names; func TestRateLimiter_Wait_noblock should be TestRateLimiterWaitNoblock
rate_limiter_test.go:21:6: don't use underscores in Go names; func TestRateLimiter_Wait_block should be TestRateLimiterWaitBlock
rate_limiter_test.go:34:6: don't use underscores in Go names; func TestRateLimiter_Try should be TestRateLimiterTry

Agreed, I've not actually been using golint but should be. Have renamed the package as I prefer rate anyway 👍