Go implementation for self-describing protocol identifiers
Go to file
decanus fabc9260ef
update
2020-03-01 13:27:43 +01:00
testdata updated 2020-02-27 17:21:38 +01:00
.gitignore Initial commit 2020-02-27 04:09:11 +01:00
.travis.yml try 2020-02-28 15:28:32 +01:00
LICENSE Initial commit 2020-02-27 04:09:11 +01:00
Makefile rm 2020-02-28 15:29:56 +01:00
README.md update 2020-03-01 13:27:43 +01:00
codec.go fix 2020-02-28 15:24:00 +01:00
component.go added test 2020-02-27 21:33:28 +01:00
go.mod pushing vendor 2020-02-28 13:42:57 +01:00
go.sum pushing vendor 2020-02-28 13:42:57 +01:00
init.go Update init.go 2020-02-28 13:36:32 +01:00
init_test.go empties 2020-02-28 15:33:40 +01:00
interface.go started implementation mainly taking from multiaddr 2020-02-27 15:17:16 +01:00
multiprotocol.go find replace 2020-02-27 17:26:53 +01:00
multiprotocol_test.go fix 2020-02-28 15:24:00 +01:00
protocol.go find replace 2020-02-27 17:26:53 +01:00
util.go started implementation mainly taking from multiaddr 2020-02-27 15:17:16 +01:00

README.md

go-multiprotocol

Version MIT License API Reference Go Report Card Build Status

A lot of this code has been adapted from multiaddr.

Multiprotocol can be initialized using a CSV file, for the CSV format see the specification.

package main

import mp "github.com/vacp2p/go-multiprotocol"

err := mp.Init("testdata/multiprotocol.csv")
// err non-nil when parsing failed.

mp, err := mp.NewMultiprotocol("/vac/waku/2/store/2/relay/2")
// err non-nil when parsing failed.

Protocols can also be added programatically using the AddProtocol function.