gvm icon indicating copy to clipboard operation
gvm copied to clipboard

ability to create symbolic link of default go version

Open bilalcaliskan opened this issue 3 years ago • 4 comments

Currently, gvm is creating a installation directory under ~/.gvm and it looks like that:

joshsagredo@kali:~$ ls -latrh /home/joshsagredo/.gvm/gos
total 20K
drwxr-xr-x  2 joshsagredo joshsagredo 4.0K Sep 10 11:59 system
drwxr-xr-x 15 joshsagredo joshsagredo 4.0K Sep 10 11:59 ..
drwxr-xr-x 10 joshsagredo joshsagredo 4.0K Sep 10 12:06 go1.19.1
drwxr-xr-x  5 joshsagredo joshsagredo 4.0K Jan 13 02:46 .
drwxr-xr-x 12 joshsagredo joshsagredo 4.0K Jan 13 02:47 go1.19.5

joshsagredo@kali:~$ which go
/home/joshsagredo/.gvm/gos/go1.19.5/bin/go

It is great but some IDEs(i am using GoLand) wants you to specifically define GOROOT. Assume that you were using go1.19.1 and decided to use go1.19.5. gvm successfully updating the system wide GOROOT but the problem is, whenever i want to bump go version, i should specify the new GOROOT path in my IDE(Goland).

It would be nice if gvm could create a symbolic link with --default flag provided version into for example ~/.gvm/gos/default directory and whenever i change the default version, it could unlink the symlink and create another one.

I love that tool, so i can raise a PR about it if it is OK!

bilalcaliskan avatar Jan 12 '23 23:01 bilalcaliskan

@bilalcaliskan kindly try this GO Version Manager: https://github.com/ankitcharolia/goenv

ankitcharolia avatar Aug 05 '23 15:08 ankitcharolia

@ankitcharolia try goup-rs which Go version manager write in rust, create a symbolic link to provid version.

findgo avatar Feb 25 '24 10:02 findgo

SAME AS

kajweb avatar Apr 24 '24 07:04 kajweb