dns: update dns command docs
License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>
Lars Gierth committed
Mar 3, 2016 at 17:06 UTC
89b233e360359ed54a517bef74c71bb0aabf9a3e
2 files changed
+10
-14
core/commands/dns.go
+9
-12
@@ -26,23 +26,20 @@ This command resolves those links to the referenced object.
26
27
For example, with this DNS TXT record:
28
29
- ipfs.io TXT "dnslink=/ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy ..."
29
+ > dig +short TXT ipfs.io
30
+ dnslink=/ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy
31
32
The resolver will give:
33
33
- > ipfs dns ipfs.io
34
- /ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy
34
+ > ipfs dns ipfs.io
35
+ /ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy
36
36
-And with this DNS TXT record:
37
+The resolver can recursively resolve:
38
38
- ipfs.ipfs.io TXT "dnslink=/dns/ipfs.io ..."
39
-
40
-The resolver will give:
41
-
42
- > ipfs dns ipfs.io
43
- /dns/ipfs.io
44
- > ipfs dns --recursive
45
- /ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy
39
+ > dig +short TXT recursive.ipfs.io
40
+ dnslink=/ipns/ipfs.io
41
+ > ipfs dns -r recursive.ipfs.io
42
+ /ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy
43
`,
44
},
45
core/pathresolver.go
+1
-2
@@ -18,8 +18,7 @@ var ErrNoNamesys = errors.New(
18
19
// Resolve resolves the given path by parsing out protocol-specific
20
// entries (e.g. /ipns/<node-key>) and then going through the /ipfs/
21
-// entries and returning the final merkledag node. Effectively
22
-// enables /ipns/, /dns/, etc. in commands.
21
+// entries and returning the final merkledag node.
22
func Resolve(ctx context.Context, n *IpfsNode, p path.Path) (*merkledag.Node, error) {
23
if strings.HasPrefix(p.String(), "/ipns/") {
24
// resolve ipns paths