package main import ( "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/gonuts/flag" "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander" "github.com/jbenet/go-ipfs/core/commands" ) var cmdIpfsPub = &commander.Command{ UsageLine: "publish", Short: "publish a to ipns.", Long: `ipfs publish [] - publish a to ipns. IPNS is a PKI namespace, where names are the hashes of public keys, and the private key enables publishing new (signed) values. In publish, the default value of is your own identity public key. Examples: Publish a to your identity name: > ipfs name publish QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy published name QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n to QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy Publish a to another public key: > ipfs name publish QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy published name QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n to QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy `, Run: pubCmd, Flag: *flag.NewFlagSet("ipfs-publish", flag.ExitOnError), } var pubCmd = makeCommand(command{ name: "publish", args: 1, flags: nil, online: true, cmdFn: commands.Publish, })