I install go by snap, the path to executable file of go is not in environment variable path, but when I use
go run test.go
in terminal (from my home directory), go still work.
As my understand, the path to executable file of go must in environment variable path, so linux can find where it is and run it. In this case, how Linux find where executable file of go is?
Here is my path variable (in file /etc/environment)
And here is path to executable file of go:
I use linux mint xfce 18.3