1

I am very new to golang. I am trying to work with the gomod. Trying to explore the go buffalo framework. But finding a bit of difficulty in installing that.

What I have done:

  1. I saw that go get is nomore supported for buffalo and so switched to go modules.

  2. Created a module by go mod init github.com/webbuffalotest

  3. Fetched go get -v github.com/gobuffalo/buffalo (on the same directory where I have go.mod file)

  4. Fetched go get -v github.com/mattn/go-sqlite3 (on the same directory where I have go.mod file)

  5. go install github.com/gobuffalo/buffalo

  6. I was expecting a buffalo.exe inside %GOPATH%/bin so that I can add it to my path but didn't find one.

My question is what's wrong? Is the exe not installed or it's somewhere else because of go mod. Any help will be highly appreciated.

go.mod content

I am using windows 10. I am not willing to install package managers as scoop or choco to install buffalo. Thanks for your patience :)

Edited: Also tried setting set GO111MODULE=on but of no use.

Solved:

My bad, I should have used go install github.com/gobuffalo/buffalo/buffalo instead of go install github.com/gobuffalo/buffalo

2
  • Have you set the GOBIN environment variable? From documentation, " If the GOBIN environment variable is set, commands are installed to the directory it names instead of DIR/bin." Commented Oct 21, 2020 at 15:25
  • 1
    My bad, I should have used go install github.com/gobuffalo/buffalo/buffalo instead of go install github.com/gobuffalo/buffalo Commented Oct 21, 2020 at 16:18

1 Answer 1

2

github.com/gobuffalo/buffalo is a library; the corresponding binary is (aptly-named) github.com/gobuffalo/buffalo/buffalo.

The go install command you ran should have warned you about that, but didn't because go install used to also be used to cache compiled libraries (it no longer does that in module mode).

I've filed https://golang.org/issue/46912 to add a diagnostic.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.