I was trying to import the go-libp2p to get started with the tutorial provided in https://docs.libp2p.io/tutorials/getting-started/go/.
But I cant import the package with either "go get github.com/libp2p/go-libp2p" or "GOPRIVATE='github.com/libp2p/*' go get ./..."
I am using go module and go version 1.14
Error Details:
$ go version
go version go1.14.5 darwin/amd64
$ GOPRIVATE='github.com/libp2p/*' go get ./...
github.com/libp2p/go-libp2p-interface-pnet
../../pkg/mod/github.com/libp2p/go-libp2p-interface-pnet@v0.1.0/deprecated.go:18:18: undefined: pnet.Protector
github.com/libp2p/go-libp2p/p2p/host/basic
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/basic_host.go:131:32: cannot use h (type *BasicHost) as type host.Host in argument to identify.NewIDService:
*BasicHost does not implement host.Host (missing EventBus method)
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/basic_host.go:158:32: cannot use h (type *BasicHost) as type host.Host in argument to ping.NewPingService:
*BasicHost does not implement host.Host (missing EventBus method)
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/basic_host.go:512:28: h.natmgr.NAT().ExternalAddrs undefined (type *"github.com/libp2p/go-libp2p-nat".NAT has no field or method ExternalAddrs)
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:94:8: assignment mismatch: 1 variable but "github.com/libp2p/go-libp2p-nat".DiscoverNAT returns 2 values
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:94:26: not enough arguments in call to "github.com/libp2p/go-libp2p-nat".DiscoverNAT
have ()
want (context.Context)
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:154:13: mapping.InternalAddr undefined (type "github.com/libp2p/go-libp2p-nat".Mapping has no field or method InternalAddr)
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:176:26: not enough arguments in call to nat.NewMapping
have (multiaddr.Multiaddr)
want (string, int)
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:206:13: mapping.InternalAddr undefined (type "github.com/libp2p/go-libp2p-nat".Mapping has no field or method InternalAddr)
I was trying to import the go-libp2p to get started with the tutorial provided in https://docs.libp2p.io/tutorials/getting-started/go/.
But I cant import the package with either "go get github.com/libp2p/go-libp2p" or "GOPRIVATE='github.com/libp2p/*' go get ./..."
I am using go module and go version 1.14
Error Details:
$ go version
go version go1.14.5 darwin/amd64
$ GOPRIVATE='github.com/libp2p/*' go get ./...
github.com/libp2p/go-libp2p-interface-pnet
../../pkg/mod/github.com/libp2p/go-libp2p-interface-pnet@v0.1.0/deprecated.go:18:18: undefined: pnet.Protector
github.com/libp2p/go-libp2p/p2p/host/basic
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/basic_host.go:131:32: cannot use h (type *BasicHost) as type host.Host in argument to identify.NewIDService:
*BasicHost does not implement host.Host (missing EventBus method)
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/basic_host.go:158:32: cannot use h (type *BasicHost) as type host.Host in argument to ping.NewPingService:
*BasicHost does not implement host.Host (missing EventBus method)
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/basic_host.go:512:28: h.natmgr.NAT().ExternalAddrs undefined (type *"github.com/libp2p/go-libp2p-nat".NAT has no field or method ExternalAddrs)
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:94:8: assignment mismatch: 1 variable but "github.com/libp2p/go-libp2p-nat".DiscoverNAT returns 2 values
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:94:26: not enough arguments in call to "github.com/libp2p/go-libp2p-nat".DiscoverNAT
have ()
want (context.Context)
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:154:13: mapping.InternalAddr undefined (type "github.com/libp2p/go-libp2p-nat".Mapping has no field or method InternalAddr)
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:176:26: not enough arguments in call to nat.NewMapping
have (multiaddr.Multiaddr)
want (string, int)
../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:206:13: mapping.InternalAddr undefined (type "github.com/libp2p/go-libp2p-nat".Mapping has no field or method InternalAddr)