From ccfb10dde01f903fe68e4f2201fc9c89d5f9148d Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Thu, 23 Oct 2014 19:25:16 -0700 Subject: [PATCH] cmd/ipfs: Added root command for CLI-specific subcommands (init, daemon, etc.) --- cmd/ipfs/root.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cmd/ipfs/root.go diff --git a/cmd/ipfs/root.go b/cmd/ipfs/root.go new file mode 100644 index 000000000..154381cbb --- /dev/null +++ b/cmd/ipfs/root.go @@ -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) + }, + }, + }, +}