mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 02:30:39 +08:00
refactor(namesys) use one-off error
This commit is contained in:
@ -1,13 +1,12 @@
|
||||
package namesys
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
b58 "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-base58"
|
||||
isd "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-is-domain"
|
||||
mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash"
|
||||
|
||||
u "github.com/jbenet/go-ipfs/util"
|
||||
)
|
||||
|
||||
// DNSResolver implements a Resolver on DNS domains
|
||||
@ -44,5 +43,5 @@ func (r *DNSResolver) Resolve(name string) (string, error) {
|
||||
return t, nil
|
||||
}
|
||||
|
||||
return "", u.ErrNotFound
|
||||
return "", fmt.Errorf("namesys: %v not found", name)
|
||||
}
|
||||
|
Reference in New Issue
Block a user