github.com/zignig/go-ipfs@v0.0.0-20141111235910-c9e5fdf55a52/cmd/ipfs/resolve.go (about) 1 package main 2 3 import ( 4 "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/gonuts/flag" 5 "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander" 6 "github.com/jbenet/go-ipfs/core/commands" 7 ) 8 9 var cmdIpfsResolve = &commander.Command{ 10 UsageLine: "resolve", 11 Short: "resolve an ipns name to a <ref>", 12 Long: `ipfs resolve [<name>] - Resolve an ipns name to a <ref>. 13 14 IPNS is a PKI namespace, where names are the hashes of public keys, and 15 the private key enables publishing new (signed) values. In resolve, the 16 default value of <name> is your own identity public key. 17 18 19 Examples: 20 21 Resolve the value of your identity: 22 23 > ipfs name resolve 24 QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy 25 26 Resolve te value of another name: 27 28 > ipfs name resolve QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n 29 QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy 30 31 `, 32 Run: resolveCmd, 33 Flag: *flag.NewFlagSet("ipfs-resolve", flag.ExitOnError), 34 } 35 36 var resolveCmd = makeCommand(command{ 37 name: "resolve", 38 args: 0, 39 flags: nil, 40 online: true, 41 cmdFn: commands.Resolve, 42 })