提交 23616af3 作者: Steven Allen

fix gateway_test on 32bit oses

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 d8a92224
......@@ -4,7 +4,6 @@ import (
"context"
"errors"
"io/ioutil"
"math"
"net/http"
"net/http/httptest"
"strings"
......@@ -41,7 +40,8 @@ func (m mockNamesys) Resolve(ctx context.Context, name string, opts ...nsopts.Re
}
depth := cfg.Depth
if depth == nsopts.UnlimitedDepth {
depth = math.MaxUint64
// max uint
depth = ^uint(0)
}
for strings.HasPrefix(name, "/ipns/") {
if depth <= 0 {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论