Allow gradual migration to go run #72
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is now a standard practice to simply invoke
go run, likego run github.com/golang/mock/mockgen, without usinggo build. At the same time, there is still a need to manage tool versions ingo.mod, and gex may be useful withoutgo build.Especially, grapi depends on gex and needs a proper way out from the current
go build-based workflow.This PR introduces a new option
--no-binthat stops gex from generating//go:generate go buildcomment. This flag is tracked by a newly generated comment line//gex:nobinin the manifest.This way the user can gradually migrate from the
go build-based workflow to thego run-based workflow.