From 89b233e360359ed54a517bef74c71bb0aabf9a3e Mon Sep 17 00:00:00 2001 From: Lars Gierth Date: Thu, 3 Mar 2016 17:06:10 +0100 Subject: [PATCH] dns: update dns command docs License: MIT Signed-off-by: Lars Gierth --- core/commands/dns.go | 21 +++++++++------------ core/pathresolver.go | 3 +-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/core/commands/dns.go b/core/commands/dns.go index 2d1745618..00b96fbb9 100644 --- a/core/commands/dns.go +++ b/core/commands/dns.go @@ -26,23 +26,20 @@ This command resolves those links to the referenced object. For example, with this DNS TXT record: - ipfs.io TXT "dnslink=/ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy ..." + > dig +short TXT ipfs.io + dnslink=/ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy The resolver will give: - > ipfs dns ipfs.io - /ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy + > ipfs dns ipfs.io + /ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy -And with this DNS TXT record: +The resolver can recursively resolve: - ipfs.ipfs.io TXT "dnslink=/dns/ipfs.io ..." - -The resolver will give: - - > ipfs dns ipfs.io - /dns/ipfs.io - > ipfs dns --recursive - /ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy + > dig +short TXT recursive.ipfs.io + dnslink=/ipns/ipfs.io + > ipfs dns -r recursive.ipfs.io + /ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy `, }, diff --git a/core/pathresolver.go b/core/pathresolver.go index dce650490..555cc3dfa 100644 --- a/core/pathresolver.go +++ b/core/pathresolver.go @@ -18,8 +18,7 @@ var ErrNoNamesys = errors.New( // Resolve resolves the given path by parsing out protocol-specific // entries (e.g. /ipns/) and then going through the /ipfs/ -// entries and returning the final merkledag node. Effectively -// enables /ipns/, /dns/, etc. in commands. +// entries and returning the final merkledag node. func Resolve(ctx context.Context, n *IpfsNode, p path.Path) (*merkledag.Node, error) { if strings.HasPrefix(p.String(), "/ipns/") { // resolve ipns paths