moovweb / gvm

Go Version Manager
http://github.com/moovweb/gvm
MIT License
9.88k stars 520 forks source link

ability to create symbolic link of default go version #421

Open bilalcaliskan opened 1 year ago

bilalcaliskan commented 1 year ago

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!

ankitcharolia commented 11 months ago

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

findgo commented 4 months ago

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

kajweb commented 2 months ago

SAME AS