mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-03 04:37:30 +08:00
cmd/ipfs: Added root command for CLI-specific subcommands (init, daemon, etc.)
This commit is contained in:

committed by
Juan Batiz-Benet

parent
c89826c1ef
commit
ccfb10dde0
19
cmd/ipfs/root.go
Normal file
19
cmd/ipfs/root.go
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
cmds "github.com/jbenet/go-ipfs/commands"
|
||||||
|
"github.com/jbenet/go-ipfs/core/commands"
|
||||||
|
)
|
||||||
|
|
||||||
|
var Root = &cmds.Command{
|
||||||
|
Options: commands.Root.Options,
|
||||||
|
Help: commands.Root.Help,
|
||||||
|
Subcommands: map[string]*cmds.Command{
|
||||||
|
"test": &cmds.Command{
|
||||||
|
Run: func(req cmds.Request, res cmds.Response) {
|
||||||
|
v := "hello, world"
|
||||||
|
res.SetValue(v)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Reference in New Issue
Block a user