From 3c4e7bf9a10f616879ff25b9984e3fa94f73c690 Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Mon, 3 Nov 2014 00:07:53 -0800 Subject: [PATCH] core/commands2: Added a simple 'message' output/formatter --- core/commands2/root.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/commands2/root.go b/core/commands2/root.go index 45c51dcca..df8fd366c 100644 --- a/core/commands2/root.go +++ b/core/commands2/root.go @@ -114,3 +114,11 @@ func init() { Root.Subcommands = rootSubcommands u.SetLogLevel("core/commands", "info") } + +type MessageOutput struct { + Message string +} + +func MessageFormatter(res cmds.Response) (string, error) { + return res.Value().(*MessageOutput).Message, nil +}