Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

[Feature Request] go.inferGopath. A GoSublime's use_gs_gopath like feature #757

Closed
codmajik opened this issue Jan 31, 2017 · 3 comments
Closed

Comments

@codmajik
Copy link
Contributor

codmajik commented Jan 31, 2017

in GoSublime specifying a $GS_GOPATH or use_gs_gopath cause it to lookup as follows:

  • the current working directory, e.g. ~/go/src/pkg then $GS_GOPATH will be ~/go/
  • or the path the current .go file (or last activated .go file if the current file is not .go) e.g. if your file path is /tmp/go/src/hello/main.go then it will be /tmp/go

in vscode-go:

  • setting go.inferGopath: true should use the current workspace to resolve a suitable gopath,
    e.g. $HOME/go/src/github.com/myuser/demoapp then go.gopath will be $HOME/go/

More info:
GoSublime Usage and Tips

I personally prefer working with multiple windows, which is what is provided right now anyways.
Having this would de-clutter explorer sidebar showing just files relevant to the project. Also prevent accidentally modifying files not related to your project.

@OneOfOne
Copy link
Contributor

OneOfOne commented Feb 3, 2017

+1 this is a handy feature if you wanna test a PoC in /tmp real quick without setting up a proper workspace.

ramya-rao-a pushed a commit that referenced this issue Feb 3, 2017
* added go.inferGopath. Similar to GoSublime's use_gs_gopath. see #757

* fix lint problems
@ramya-rao-a
Copy link
Contributor

PR is merged. This should be out in the next update.
Thanks for the work @codmajik, looking forward to work more with you on this extension.

@ramya-rao-a
Copy link
Contributor

This feature is now available in the latest update (0.6.54) to the Go extension.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants