Can I delete ~/go?

2 réponses [Dernière contribution]
calher

I am a member!

Hors ligne
A rejoint: 06/19/2015

I built and installed a few Go programs. Is it safe to remove ~/go or do I need to leave it there?

Programs installed: gmnitohtml, Kiln.

jxself
Hors ligne
A rejoint: 09/13/2010

It depends on how you installed these Go programs. By default, when you install a Go program using go install, it places the compiled binary in ~/go/bin/. If you’ve already moved the binaries to another location, then it could be safe to remove ~/go. However, if you haven't moved them, deleting ~/go will also remove the installed binaries.

Legimet
Hors ligne
A rejoint: 12/10/2013

You can also adjust your GOPATH environment variable if you want Go to use a different location than ~/go: https://go.dev/wiki/SettingGOPATH