Skip to content

Attempt to determine GOPATH from go env #2

@kevinkjt2000

Description

@kevinkjt2000

Thanks for the awesome refactoring plugin!

Since I use asdf to manage my go installations and swap versions as I navigate to different directories, it would be nice if GOPATH was determined from go env as a fallback if GOPATH is missing from the environment.

└─▪ go env
...
GOPATH="/home/kevin/.asdf/installs/golang/1.12.7/packages"
...

My workaround at the moment is to rely on direnv by adding this to my ~/.envrc file:

eval "$(go env)"
export GOPATH

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions