@cryptotaxi247 / kubo / commits / 3c4e7bf9a

core/commands2: Added a simple 'message' output/formatter

Matt Bell committed Nov 3, 2014 at 00:07 UTC 3c4e7bf9a10f616879ff25b9984e3fa94f73c690
1 file changed +8
core/commands2/root.go
+8
@@ -114,3 +114,11 @@ func init() {
114 Root.Subcommands = rootSubcommands
115 u.SetLogLevel("core/commands", "info")
116 }
117 +
118 +type MessageOutput struct {
119 + Message string
120 +}
121 +
122 +func MessageFormatter(res cmds.Response) (string, error) {
123 + return res.Value().(*MessageOutput).Message, nil
124 +}