1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 09:52:20 +08:00

core: rearranged initialization a bit

This commit is contained in:
Juan Batiz-Benet
2015-01-02 05:40:38 -08:00
parent 56867c8b70
commit 1fa14335b9
2 changed files with 104 additions and 75 deletions

View File

@ -23,6 +23,10 @@ type routingResolver struct {
// NewRoutingResolver constructs a name resolver using the IPFS Routing system
// to implement SFS-like naming on top.
func NewRoutingResolver(route routing.IpfsRouting) Resolver {
if route == nil {
panic("attempt to create resolver with nil routing system")
}
return &routingResolver{routing: route}
}