Cannot find package "github.com/ipfs/go-ipfs/core/corenet"

example :https://ipfs.io/ipfs/QmNZiPk974vDsPmQii3YbrMKfi12KTSNM7XMiYyiea4VYZ/example#/ipfs/QmP8WUPq2braGQ8iZjJ6w9di6mzgoTWyRLayrMRjjDoyGr/api/service/readme.md

import “github.com/ipfs/go-ipfs/core/corenet” ,but cannot find

You need to check-out the go-ipfs sources and place them in your GOPATH.

go get -u -d github.com/ipfs/go-ipfs probably works for that. See: https://github.com/ipfs/go-ipfs/#download-and-compile-ipfs

github.com/ipfs/go-ipfs/core/corenet was moved and changed. I am not sure how to resolve it.

1 Like

Some overhauling is needed. I remember that just changing the libs won’t do, since there are some functionality changes.

This API has been replaced with https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#ipfs-p2p. You should be able to do all the same things with it. If you think it can be somehow improved, comment on https://github.com/ipfs/go-ipfs/issues/3994.

I have dowload go-ipfs source code,but there is not "github.com/ipfs/go-ipfs/core/corenet