mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-05 08:18:03 +08:00
core/commands2: Added a simple 'message' output/formatter
This commit is contained in:
parent
92e308f32b
commit
3c4e7bf9a1
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user