You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say you have a project named foobar, this one uses redis and chi(for example).
The foobar project will not import the limiter middleware gin or fasthttp. And as such, it will not declare github.com/gin-gonic/gin and github.com/valyala/fasthttp in its (foobar project)go.mod nor download it, which is a good thing.
However, the foobar project will have a declaration of github.com/gin-gonic/gin and github.com/valyala/fasthttp in its go.sum. Which in a sense, is a "dependency leak", because you "import" something you don't use.
I know it's a minor problem, but I would like as much as possible to not "force" dependency to limiter users if they don't use gin or fasthttp for example.
I hope I was more precise and clear with this explanation 🤞
Currently, while using
github.com/ulule/limiter
it doesn't downloadgin
,redis
or evenfasthttp
if you doesn't use it.It bothers me that these libraries are exported to the
go.sum
of a project, even though it's not included in it'sgo.mod
.Maybe there is a solution to reduce this annoyance. I don't know 🤷♂️
The text was updated successfully, but these errors were encountered: