Hacker News new | ask | show | jobs
by moondev 862 days ago
Still holding out hope for a "go run" flag to easily run module programs with replacements in go.mod

      go run k8s.io/kubernetes/cmd/kubectl@v1.28.2
1 comments

Yes. Many times I've forgotten to remove my local "replace" in go.mod before git pushing. Would be nice to have a runtime replace for local dev.
If you use go.work (workspace) you don’t have to touch your go.mod file. Just don't commit go.work