gogopathfyne

Cannot use Go Commands of go libraries. [$GOBIN or $GOPATH problem, Windows]


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


Solution

  • 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 .