Go-swagger: Cannot install go-swagger

Created on 27 Sep 2018  路  2Comments  路  Source: go-swagger/go-swagger

Problem statement

Cannot install go-swagger, documentation is not getting me any further, help much appreciated.

Steps to reproduce

brew install go-swagger

  • swagger does not have generate command

go get -u github.com/go-swagger/go-swagger/cmd/swagger

  • swagger: command not found

If i go to go-swagger/go-swagger/cmd/swagger/ i can run go run swagger.go but i expect to be able to run swagger the normal way?

Environment

swagger version: 0.16.0
go version: 1.9.2
OS: macOS High Sierra 10.13.6

install & setup

Most helpful comment

option 2: you're missing $GOPATH/bin on your path which is why it can't find the executable

something along these lines should fix that:

echo 'export PATH="${GOPATH-"~/go"}/bin:$PATH"' >> ~/.bashrc && exec $SHELL

All 2 comments

option 1, I suspect you're on go 1.11 that will be fixed on the next release

option 2: you're missing $GOPATH/bin on your path which is why it can't find the executable

something along these lines should fix that:

echo 'export PATH="${GOPATH-"~/go"}/bin:$PATH"' >> ~/.bashrc && exec $SHELL
Was this page helpful?
0 / 5 - 0 ratings