Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #8 from Arachnid/patch-1
Browse files Browse the repository at this point in the history
Use eth.domains instead of eth.link for .eth names
  • Loading branch information
aschmahmann authored Apr 5, 2021
2 parents db5d403 + cbcc19c commit c17fc94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

const ethTLD = "eth"
const linkTLD = "link"
const linkTLD = "domains"

// LookupTXTFunc is a generic type for a function that lookups TXT record values.
type LookupTXTFunc func(name string) (txt []string, err error)
Expand Down
4 changes: 2 additions & 2 deletions dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func newMockDNS() *mockDNS {
"fqdn.example.com.": {
"dnslink=/ipfs/QmYvMB9yrsSf7RKBghkfwmHJkzJhW2ZgVwq3LxBXXPasFr",
},
"www.wealdtech.eth.link.": {
"www.wealdtech.eth.domains.": {
"dnslink=/ipns/ipfs.example.com",
},
},
Expand Down Expand Up @@ -168,5 +168,5 @@ func TestDNSResolution(t *testing.T) {
testResolution(t, r, "fqdn.example.com.", opts.DefaultDepthLimit, "/ipfs/QmYvMB9yrsSf7RKBghkfwmHJkzJhW2ZgVwq3LxBXXPasFr", nil)
testResolution(t, r, "www.wealdtech.eth", 1, "/ipns/ipfs.example.com", ErrResolveRecursion)
testResolution(t, r, "www.wealdtech.eth", 2, "/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD", nil)
testResolution(t, r, "www.wealdtech.eth.link", 2, "/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD", nil)
testResolution(t, r, "www.wealdtech.eth.domains", 2, "/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD", nil)
}

0 comments on commit c17fc94

Please sign in to comment.