github.com/zignig/go-ipfs@v0.0.0-20141111235910-c9e5fdf55a52/cmd/ipfs/ls.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 cmdIpfsLs = &commander.Command{ 10 UsageLine: "ls", 11 Short: "List links from an object.", 12 Long: `ipfs ls <ipfs-path> - List links from an object. 13 14 Retrieves the object named by <ipfs-path> and displays the links 15 it contains, with the following format: 16 17 <link base58 hash> <link size in bytes> <link name> 18 19 `, 20 Run: lsCmd, 21 Flag: *flag.NewFlagSet("ipfs-ls", flag.ExitOnError), 22 } 23 24 var lsCmd = makeCommand(command{ 25 name: "ls", 26 args: 1, 27 flags: nil, 28 cmdFn: commands.Ls, 29 })