Closed deiu closed 3 years ago
I have managed to find and resolve the issue. It turns out I needed to import the v3
version of go-ens
, which is a bit different than the example in the README. A good rule of thumb is to always import the package currently defined for go-ens
in go.mod
, which in this case is module github.com/wealdtech/go-ens/v3
.
For those looking for a fix, you need to do this in the example:
package main
import (
"github.com/ethereum/go-ethereum/ethclient"
ens "github.com/wealdtech/go-ens/v3"
)
....
When trying to build a newly started project using go modules, I get some issues coming out from
go-ens
.To replicate, you can take the example from the README file and put it in a new file (e.g. main.go) sitting in an empty dir. Next you init the go modules.
Next, I try to run
go build ./...
:Output of generated
go.mod
:Here is the output of
go version
: