@cryptotaxi247 / kubo / commits / ccfb10dde

cmd/ipfs: Added root command for CLI-specific subcommands (init, daemon, etc.)

Matt Bell committed Oct 23, 2014 at 19:25 UTC ccfb10dde01f903fe68e4f2201fc9c89d5f9148d
1 file changed +19
cmd/ipfs/root.go new
+19
@@ -0,0 +1,19 @@
1 +package main
2 +
3 +import (
4 + cmds "github.com/jbenet/go-ipfs/commands"
5 + "github.com/jbenet/go-ipfs/core/commands"
6 +)
7 +
8 +var Root = &cmds.Command{
9 + Options: commands.Root.Options,
10 + Help: commands.Root.Help,
11 + Subcommands: map[string]*cmds.Command{
12 + "test": &cmds.Command{
13 + Run: func(req cmds.Request, res cmds.Response) {
14 + v := "hello, world"
15 + res.SetValue(v)
16 + },
17 + },
18 + },
19 +}