mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-15 11:13:37 +08:00
27 lines
630 B
Go
27 lines
630 B
Go
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 cmdIpfsCat = &commander.Command{
|
|
UsageLine: "cat",
|
|
Short: "Show ipfs object data.",
|
|
Long: `ipfs cat <ipfs-path> - Show ipfs object data.
|
|
|
|
Retrieves the object named by <ipfs-path> and displays the Data
|
|
it contains.
|
|
`,
|
|
Run: catCmd,
|
|
Flag: *flag.NewFlagSet("ipfs-cat", flag.ExitOnError),
|
|
}
|
|
|
|
var catCmd = makeCommand(command{
|
|
name: "cat",
|
|
args: 1,
|
|
flags: nil,
|
|
cmdFn: commands.Cat,
|
|
})
|