mvdan / gofumpt

A stricter gofmt
https://pkg.go.dev/mvdan.cc/gofumpt
BSD 3-Clause "New" or "Revised" License
3.15k stars 110 forks source link

Fail to install #276

Closed eljuanchosf closed 1 year ago

eljuanchosf commented 1 year ago

Hello! I'm trying to install this awesome tool, but it fails:

Message:

go get github.com/mvdan/gofumpt
go: github.com/mvdan/gofumpt@v0.5.0: parsing go.mod:
        module declares its path as: mvdan.cc/gofumpt
                but was required as: github.com/mvdan/gofumpt

Go version:

go version
go version go1.18.10 darwin/arm64
  1. Can confirm that happens with all versions
  2. Tried reinitializing the go.mod
  3. I can install all other libraries without issue

Am I doing something wrong?

cristaloleg commented 1 year ago

Hi, have you tried the command from the README: go install mvdan.cc/gofumpt@latest ?

eljuanchosf commented 1 year ago

Hi, have you tried the command from the README: go install mvdan.cc/gofumpt@latest ?

Hello @cristaloleg!! Yes I did. Still with the same issue. :(

cristaloleg commented 1 year ago

Can you show the whole output for go install mvdan.cc/gofumpt@latest please?

(also, Go 1.18 is somewhat old, can you upgrade to 1.20?)

eljuanchosf commented 1 year ago

So I think something was wrong with my installation. I reinstalled go and everything works!! Thanks for your time, @cristaloleg !!