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

This commit is contained in:
Matt Bell 2014-11-03 00:07:53 -08:00 committed by Juan Batiz-Benet
parent 92e308f32b
commit 3c4e7bf9a1

View File

@ -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
}