# How to compute the ipld scheme CID in golang or others?

**URL:** <https://discuss.ipfs.tech/t/how-to-compute-the-ipld-scheme-cid-in-golang-or-others/18421>\
**Category:** Help\
**Tags:** go-ipfs\
**Created:** [August 23, 2024, 6:30am UTC](https://discuss.ipfs.tech/t/how-to-compute-the-ipld-scheme-cid-in-golang-or-others/18421 "2024-08-23T06:30:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CLEILI](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/cleili/32/8799_2.png) [@CLEILI](https://discuss.ipfs.tech/u/CLEILI)\
**Post date:** [August 23, 2024, 6:30am UTC](https://discuss.ipfs.tech/t/how-to-compute-the-ipld-scheme-cid-in-golang-or-others/18421/1 "2024-08-23T06:30:12Z")

</div>

I use `ipfs ls <CID>` or `ipfs dag get <CID>` to get the chunks’cid of a file in the file’s Merkle DAG. Then I use `ipfs get <CID>` to get a 256KB chunk in the list.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/0/0c93165679fc165870255db37985331612d542ac.png)  
However, when I use cid.NewCidV0() in golang to re-compute this chunk’s CID, it get the different output. The origin is `Qmbx3PCfDUWmPCAbi19n3XFB127cMEUKBWRpj4jFidKSZP`, but I got `QmeJyXwjcbrcMPcqrJx7YgtvBKQC39eLRNYw7sF3M6zcdT` through cid.NewCidV0().  
I have seen this [issue](https://discuss.ipfs.tech/t/parents-hash-creating-process/14783) and guess that the situation is related to IPLD. But I can’t find the specific tutorial to reproduce Merkle DAG in IPFS.

---

<div class="post-metadata">

**Author:** ![CLEILI](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/cleili/32/8799_2.png) [@CLEILI](https://discuss.ipfs.tech/u/CLEILI)\
**Post date:** [August 23, 2024, 6:32am UTC](https://discuss.ipfs.tech/t/how-to-compute-the-ipld-scheme-cid-in-golang-or-others/18421/2 "2024-08-23T06:32:11Z")

</div>

Or I can ask in a different way, how can I reproduce the tree structure in this figure using Golang or others. Please give me an detail answer 😭

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/c/c37515dc022f445b2c5144ce2e418a4c50ea525e.png)
