-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a go.work for examples instead of go.mod's replace directive #846
base: main
Are you sure you want to change the base?
Conversation
bd5f415
to
56d4b0f
Compare
Signed-off-by: Sylvain Rabot <[email protected]>
Potentially my understanding is wrong here, but I was under the impression that it's not generally advisable to commit a go.work file. |
I wouldn't do it a project's root but I think it is acceptable for an examples/ sub folder. |
Sorry about the delayed response on this one. I dislike that the examples have a It sounds like a I'm not an expert on Go workspaces, and don't recall using them myself. I guess they allow you to open multiple Go projects at once or something? So, the reasons we haven't merged this seem to be that @joerdav and I don't currently have the knowledge and experience to make a call on this, so we need to do that before we can make a call on it, hence the delay. |
The use case I've seen for workspaces is very different than this, like for using a local version of a dependency without editing the go.mod And most projects I've seen have it gitignored, but if this works then maybe it's a correct use case too! |
If you want an example of checked in go.work you have https://github.com/kubernetes-sigs/kustomize/. |
If it helps It is advised against here https://go.dev/ref/mod#go-work-file after a lot of discussion here golang/go#53502 |
Go workspaces are easier to override.