Hacker News new | ask | show | jobs
by mseepgood 501 days ago
> Using "go tool" forces you to have a bunch of dependencies in your go.mod

No, it doesn't. You can use "go tool -modfile=tools.mod mytool" if you want them separate.

3 comments

I built a simple tool to generate binstubs and work around this problem: https://github.com/jcmfernandes/go-tools-binstubs

However, having multiple tools share a single mod file still proves problematic occasionally, due to incompatible dependencies.

This should almost certainly be the default recommendation.
That seems like it should have been the default