0zAND1z
December 20, 2017, 10:48am
1
As there was no github repo for this docs article (https://ipfs.io/docs/examples/example-viewer/example#../api/service/readme.md ) I am writing here…
This cool article by @whyrusleeping explains about how to create a custom IPFS Service using GoLang.
However, the corenet "github.com/ipfs/go-ipfs/core/corenet"
dependency seems to have some issue. It is no longer part of the core IPFS.
Some suggested the corenet has been replaced by the p2p component (cc @Magik6k ). But p2p component doesn’t have the method “Listen” used in the code…
Maybe revise the code and dependencies?
Much awaited to create my custom IPFS Service!!!
TIA
1 Like
0zAND1z
December 21, 2017, 3:45am
2
Magik6k
December 26, 2017, 1:50pm
4
The old Listen
method is more-or-less equal to https://github.com/ipfs/go-ipfs/blob/master/p2p/p2p.go#L146 , it’s not public though, it’s accessible from ipfs p2p
command. The interface is not great, if you have ideas on how to improve it, go ahead and write them down in https://github.com/ipfs/go-ipfs/issues/3994
yes, and it seems to miss “corenet” package.
Here’s the error I keep getting when I go run host.go
:
host.go:10:2: cannot find package "code.google.com/p/go.net/context" in any of:
/usr/local/Cellar/go/1.10/libexec/src/code.google.com/p/go.net/context (from $GOROOT)
/Users/username/go/src/code.google.com/p/go.net/context (from $GOPATH)
host.go:6:2: cannot find package "github.com/jbenet/go-ipfs/core" in any of:
/usr/local/Cellar/go/1.10/libexec/src/github.com/jbenet/go-ipfs/core (from $GOROOT)
/Users/username/go/src/github.com/jbenet/go-ipfs/core (from $GOPATH)
host.go:7:2: cannot find package "github.com/jbenet/go-ipfs/core/corenet" in any of:
/usr/local/Cellar/go/1.10/libexec/src/github.com/jbenet/go-ipfs/core/corenet (from $GOROOT)
/Users/username/go/src/github.com/jbenet/go-ipfs/core/corenet (from $GOPATH)
host.go:8:2: cannot find package "github.com/jbenet/go-ipfs/repo/fsrepo" in any of:
/usr/local/Cellar/go/1.10/libexec/src/github.com/jbenet/go-ipfs/repo/fsrepo (from $GOROOT)
/Users/username/go/src/github.com/jbenet/go-ipfs/repo/fsrepo (from $GOPATH)