-1

When I get go libraries from github, I can use them in code. But I cannot use their commands. For example, after "go get annie", I try to use its command, e.g."annie bebe.be/be/bebe". But I get "The term 'annie' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again."

Another example is Fyne. I've installed with "go get fyne.io/fyne". I can create an application with it. But I cannot use "fyne package" command.

Just reinstalled go 1.14. Windows 10. "$env:GOPATH" gives "C:\Users\Bekassyl/golang". "$env:GOBIN" gives "C:\Users\Bekassyl\golang\bin".

Please help.


You guys mean this, right? $GOBIN is in Path now

Still doesn't work

Bekassyl
  • 45
  • 7

2 Answers2

1

You need to add the value of $env:GOBIN to your windows PATH environment variable.

You might also need to open a new cmd or powershell window for this to take effect.

Shiraaz.M
  • 3,073
  • 2
  • 24
  • 40
  • "$env:GOBIN" gives "C:\Users\Bekassyl\golang\bin". So, I've added "C:\Users\Bekassyl\golang\bin" to Path env variable both for User Variables and System Variables. But still I cannot use "fyne install" or "fyne package". – Bekassyl Apr 09 '20 at 06:29
  • Did you open a new terminal/shell or log out and back in to ensure the new variable was picked up? – andy.xyz Apr 09 '20 at 20:36
  • Yeap, did both refreshenv and opened new powershell – Bekassyl Apr 10 '20 at 04:49
1

The fyne binary is installed by running ‘go get fyne.io/fyne/cmd/fyne’ as is common with go libraries the root of the project is the API and the supporting applications are in the ‘cmd/‘ subpackage. See https://tour.fyne.io/introduction/packaging.html or https://fyne.io/develop/distribution .

andy.xyz
  • 2,567
  • 1
  • 13
  • 18