Commit 46ca29fe authored by hannahhoward's avatar hannahhoward

fix(cidlink): init multicodec registry

allocate multicode tables so register functions don't panic
parent fc13adf1
......@@ -7,6 +7,11 @@ var (
multicodecEncodeTable MulticodecEncodeTable
)
func init() {
multicodecEncodeTable = make(MulticodecEncodeTable)
multicodecDecodeTable = make(MulticodecDecodeTable)
}
// RegisterMulticodecDecoder is used to register multicodec features.
// It adjusts a global registry and may only be used at program init time;
// it is meant to provide a plugin system, not a configuration mechanism.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment