fix: add init to create an empty router
This commit is contained in:
parent
6c31a0a79f
commit
610d5fe268
|
@ -22,6 +22,10 @@ type APIEntry struct {
|
||||||
var apiRegistry []APIEntry
|
var apiRegistry []APIEntry
|
||||||
var router router2.ProtocolRouter
|
var router router2.ProtocolRouter
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
router = make(router2.ProtocolRouter)
|
||||||
|
}
|
||||||
|
|
||||||
func Register(entry APIEntry) {
|
func Register(entry APIEntry) {
|
||||||
apiRegistry = append(apiRegistry, entry)
|
apiRegistry = append(apiRegistry, entry)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue