Skip to content
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

proposal: cmd/go: add go work toggle flag #57085

Closed
switchupcb opened this issue Dec 5, 2022 · 2 comments
Closed

proposal: cmd/go: add go work toggle flag #57085

switchupcb opened this issue Dec 5, 2022 · 2 comments

Comments

@switchupcb
Copy link

Step 1: https://github.com/golang/proposal#the-proposal-process
The proposal author creates a brief issue describing the proposal.
Note: There is no need for a design document at this point.
Note: A non-proposal issue can be turned into a proposal by simply adding the proposal label.
Note: Language changes should follow a separate template

Developers are required to use environment variables to switch in and out of workspace mode. This means using set GOWORK=off or export GOWORK=off depending on the platform. This in itself is problematic since you have to give out two different instructions (which depend on the user OS). In order to go back into workspace mode, you need to set the GOWORK variable back. If you are dealing with a long path it's time consuming and prone to error.

Toggle Flag

go work toggle

When GOWORK is set, switches the GO Workspace to off.
When GOWORK is off, switches the GO Workspace to current directory.

Flags

-d - Set directory to switch to using relative path.

@gopherbot gopherbot added this to the Proposal milestone Dec 5, 2022
@seankhliao
Copy link
Member

this is called go env -w GOWORK=off

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2022
@switchupcb
Copy link
Author

switchupcb commented Dec 5, 2022

@seankhliao No. The behavior is different. How can you set GOWORK to current directory (without typing).

@golang golang locked and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants