I am quite inexperienced with go pakcages and dependencies.
I would like to clone https://github.com/ipfs/go-ipfs/tree/master/docs/examples/go-ipfs-as-a-library/main.go on my repo to use it for a project. I can successfully run main.go when in $GOPATH/src/github.com/ipfs/go-ipfs/docs/examples/go-ipfs-as-a-library/, but when I copy it somewhere else, I am not able to build it (although I installed the dependencies). Do I need a mod.go file ?
The error I get when building is the following:
# github.com/ipfs/go-bitswap/decision
../../ipfs/go-bitswap/decision/engine.go:352:33: e.peerRequestQueue.PopBlock undefined (type *peertaskqueue.PeerTaskQueue has no field or method PopBlock)
../../ipfs/go-bitswap/decision/engine.go:358:34: e.peerRequestQueue.PopBlock undefined (type *peertaskqueue.PeerTaskQueue has no field or method PopBlock)
../../ipfs/go-bitswap/decision/engine.go:361:34: e.peerRequestQueue.PopBlock undefined (type *peertaskqueue.PeerTaskQueue has no field or method PopBlock)
../../ipfs/go-bitswap/decision/engine.go:464:24: e.peerRequestQueue.PushBlock undefined (type *peertaskqueue.PeerTaskQueue has no field or method PushBlock)
../../ipfs/go-bitswap/decision/engine.go:468:57: unknown field 'Identifier' in struct literal of type peertask.Task
../../ipfs/go-bitswap/decision/engine.go:474:21: e.peerRequestQueue.PushBlock undefined (type *peertaskqueue.PeerTaskQueue has no field or method PushBlock)
../../ipfs/go-bitswap/decision/engine.go:489:23: e.peerRequestQueue.PushBlock undefined (type *peertaskqueue.PeerTaskQueue has no field or method PushBlock)
../../ipfs/go-bitswap/decision/engine.go:490:6: unknown field 'Identifier' in struct literal of type peertask.Task
# github.com/libp2p/go-libp2p-pubsub-router
../../libp2p/go-libp2p-pubsub-router/pubsub.go:467:22: sub.NextPeerEvent undefined (type *pubsub.Subscription has no field or method NextPeerEvent)
Do you know how I could fix this ?
Thanks in advance