# Good tutorials for go-ipfs library

**URL:** <https://discuss.ipfs.tech/t/good-tutorials-for-go-ipfs-library/11924>\
**Category:** Docs & Tutorials\
**Created:** [August 9, 2021, 6:40pm UTC](https://discuss.ipfs.tech/t/good-tutorials-for-go-ipfs-library/11924 "2021-08-09T18:40:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![rusfearuth](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@rusfearuth](https://discuss.ipfs.tech/u/rusfearuth)\
**Post date:** [August 9, 2021, 6:40pm UTC](https://discuss.ipfs.tech/t/good-tutorials-for-go-ipfs-library/11924/1 "2021-08-09T18:40:34Z")

</div>

I cannot find good tutorial about creating repo + node by means ipfs in go. Also, it will be nice to find how to create a daemon by means go lib.

The world is going crazy… Only JS is everywhere 😭

---

<div class="post-metadata">

**Author:** ![Jorropo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jorropo/32/3230_2.png) [@Jorropo](https://discuss.ipfs.tech/u/Jorropo)\
**Post date:** [August 9, 2021, 6:46pm UTC](https://discuss.ipfs.tech/t/good-tutorials-for-go-ipfs-library/11924/2 "2021-08-09T18:46:27Z")

</div>

> **[go-ipfs/docs/examples/go-ipfs-as-a-library at master · ipfs/go-ipfs](https://github.com/ipfs/go-ipfs/tree/master/docs/examples/go-ipfs-as-a-library)**
>
> master/docs/examples/go-ipfs-as-a-library

---

<div class="post-metadata">

**Author:** ![chrispanag](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/chrispanag/32/5192_2.png) [@chrispanag](https://discuss.ipfs.tech/u/chrispanag)\
**Post date:** [August 18, 2021, 10:28am UTC](https://discuss.ipfs.tech/t/good-tutorials-for-go-ipfs-library/11924/3 "2021-08-18T10:28:07Z")

</div>

I tried this tutorial and unfortunately I can’t make the code to work for me 😢

I get these errors:

```bash
# github.com/multiformats/go-multiaddr-net
../../go/pkg/mod/github.com/multiformats/go-multiaddr-net@v0.2.0/registry.go:25:17: undefined: manet.NetCodec
../../go/pkg/mod/github.com/multiformats/go-multiaddr-net@v0.2.0/registry.go:29:2: undefined: manet.RegisterNetCodec
# github.com/libp2p/go-libp2p-noise
../../go/pkg/mod/github.com/libp2p/go-libp2p-noise@v0.2.0/handshake.go:202:40: s.LocalPublicKey().Bytes undefined (type "github.com/libp2p/go-libp2p-core/crypto".PubKey has no field or method Bytes)
# github.com/ipfs/go-ipns
../../go/pkg/mod/github.com/ipfs/go-ipns@v0.1.0/ipns.go:276:20: pk.Bytes undefined (type "github.com/libp2p/go-libp2p-core/crypto".PubKey has no field or method Bytes)
# github.com/libp2p/go-libp2p/p2p/protocol/identify
../../go/pkg/mod/github.com/libp2p/go-libp2p@v0.14.3/p2p/protocol/identify/id.go:536:23: ownKey.Bytes undefined (type "github.com/libp2p/go-libp2p-core/crypto".PubKey has no field or method Bytes)

```

Do you have any suggestions? Has anybody encountered the same issues? (GoLang v1.16.6)

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [August 18, 2021, 11:51am UTC](https://discuss.ipfs.tech/t/good-tutorials-for-go-ipfs-library/11924/4 "2021-08-18T11:51:36Z")

</div>

Master works when doing `go mod tidy` first. I don’t get to reproduce the errors. But I know where they come from.

If you are trying your own code, please require go-libp2p-core v0.8.6 and not v0.9.0 and go-multiaddr v0.3.3 and not v0.4.0.

---

<div class="post-metadata">

**Author:** ![chrispanag](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/chrispanag/32/5192_2.png) [@chrispanag](https://discuss.ipfs.tech/u/chrispanag)\
**Post date:** [August 18, 2021, 12:43pm UTC](https://discuss.ipfs.tech/t/good-tutorials-for-go-ipfs-library/11924/5 "2021-08-18T12:43:13Z")

</div>

Thank you @hector, yes I was trying my own code. Are there anywhere any resources that contain package compatibility information?

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [August 18, 2021, 12:45pm UTC](https://discuss.ipfs.tech/t/good-tutorials-for-go-ipfs-library/11924/6 "2021-08-18T12:45:14Z")

</div>

The code is your best resource. Go to go-ipfs/go.mod and use the same versions for ensure compatibility. Alternatively to libp2p/go-libp2p.

Normally things work with latest tagged versions of everything, but not always. A new libp2p release is coming up that will resolve these issues.

---

<div class="post-metadata">

**Author:** ![faddat](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/faddat/32/4145_2.png) [@faddat](https://discuss.ipfs.tech/u/faddat)\
**Post date:** [August 27, 2021, 3:34pm UTC](https://discuss.ipfs.tech/t/good-tutorials-for-go-ipfs-library/11924/7 "2021-08-27T15:34:28Z")

</div>

Hi hector, I’ve been working to refactor ipget so I can use it to download state snapshots for blockchains. I want to embed it, and I want to do that in a single line of code.

Here’s the code:

> **[GitHub - notional-labs/get: golang library for downloading ipfs files](https://github.com/notional-labs/get)**
>
> golang library for downloading ipfs files. Contribute to notional-labs/get development by creating an account on GitHub.

If I use the latest versions, I get what @chrispang describes. Exactly that, even.

If I use current versions, I get:

```auto
# github.com/ipfs/go-ipfs/core/coreapi
../../../go/pkg/mod/github.com/ipfs/go-ipfs@v0.9.1/core/coreapi/path.go:52:18: undefined: resolver.ResolveOnce
../../../go/pkg/mod/github.com/ipfs/go-ipfs@v0.9.1/core/coreapi/path.go:64:3: unknown field 'DAG' in struct literal of type resolver.Resolver
../../../go/pkg/mod/github.com/ipfs/go-ipfs@v0.9.1/core/coreapi/path.go:65:3: unknown field 'ResolveOnce' in struct literal of type resolver.Resolver

```

and what I need to do, is create a stable, embeddable tool that allows people to make deterministic downloads.

---

<div class="post-metadata">

**Author:** ![Jorropo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jorropo/32/3230_2.png) [@Jorropo](https://discuss.ipfs.tech/u/Jorropo)\
**Post date:** [August 30, 2021, 9:41am UTC](https://discuss.ipfs.tech/t/good-tutorials-for-go-ipfs-library/11924/8 "2021-08-30T09:41:06Z")

</div>

Seems like you updated `go-ipfs` but not it’s dependencies in your `go.mod`.

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [August 30, 2021, 10:29am UTC](https://discuss.ipfs.tech/t/good-tutorials-for-go-ipfs-library/11924/9 "2021-08-30T10:29:44Z")

</div>

I checked out your repo and it works for me.

---

<div class="post-metadata">

**Author:** ![faddat](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/faddat/32/4145_2.png) [@faddat](https://discuss.ipfs.tech/u/faddat)\
**Post date:** [September 18, 2021, 2:13pm UTC](https://discuss.ipfs.tech/t/good-tutorials-for-go-ipfs-library/11924/10 "2021-09-18T14:13:38Z")

</div>

had intermittent issues-- thank you for checking!

I am not sure I will continue to develop this software, but it was a fun exercise.
