Skip to content

Commit e5c5fe7

Browse files
committed
resolve: kill off buggy resolve function
This resolve function assumed that all paths were of the same type (ipfs, ipld, etc.). The CoreAPI does a much better job.
1 parent 54b4c6d commit e5c5fe7

File tree

2 files changed

+0
-47
lines changed

2 files changed

+0
-47
lines changed

namesys/resolve/pathresolver_test.go

-32
This file was deleted.

namesys/resolve/resolve.go

-15
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import (
66
"fmt"
77
"strings"
88

9-
"github.com/ipfs/go-ipld-format"
109
"github.com/ipfs/go-path"
11-
"github.com/ipfs/go-path/resolver"
1210

1311
"github.com/ipfs/go-ipfs/namesys"
1412
)
@@ -52,16 +50,3 @@ func ResolveIPNS(ctx context.Context, nsys namesys.NameSystem, p path.Path) (pat
5250
}
5351
return p, nil
5452
}
55-
56-
// Resolve resolves the given path by parsing out protocol-specific
57-
// entries (e.g. /ipns/<node-key>) and then going through the /ipfs/
58-
// entries and returning the final node.
59-
func Resolve(ctx context.Context, nsys namesys.NameSystem, r *resolver.Resolver, p path.Path) (format.Node, error) {
60-
p, err := ResolveIPNS(ctx, nsys, p)
61-
if err != nil {
62-
return nil, err
63-
}
64-
65-
// ok, we have an IPFS path now (or what we'll treat as one)
66-
return r.ResolvePath(ctx, p)
67-
}

0 commit comments

Comments
 (0)