mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-25 20:37:53 +08:00
Fix gateway test
License: MIT Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
This commit is contained in:
parent
1abf8366ee
commit
5096025df2
@ -28,11 +28,7 @@ var emptyDir = "/ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn"
|
||||
|
||||
type mockNamesys map[string]path.Path
|
||||
|
||||
func (m mockNamesys) Resolve(ctx context.Context, name string) (value path.Path, err error) {
|
||||
return m.ResolveN(ctx, name, namesys.DefaultDepthLimit)
|
||||
}
|
||||
|
||||
func (m mockNamesys) ResolveN(ctx context.Context, name string, depth int) (value path.Path, err error) {
|
||||
func (m mockNamesys) Resolve(ctx context.Context, name string, opts *namesys.ResolveOpts) (value path.Path, err error) {
|
||||
p, ok := m[name]
|
||||
if !ok {
|
||||
return "", namesys.ErrResolveFailed
|
||||
|
||||
Loading…
Reference in New Issue
Block a user