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.
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