ipld-eth-server/vendor/github.com/ipfs/go-ipfs-addr/README.md

1.3 KiB

go-ipfs-addr

Coverage Status Travis CI

A parsing utility for ipfs multiaddrs.

Table of Contents

Install

make install

Examples

import "github.com/ipfs/go-ipfs-addr"

addrstr := "/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
a, _ := ipfsaddr.ParseString(addr)

fmt.Println("peer id: ", a.ID())
fmt.Println("transport multiaddr: ", a.Transport())

Contribute

PRs are welcome!

Small note: If editing the Readme, please conform to the standard-readme specification.

License

MIT © Whyrusleeping