Skip to content

Instantly share code, notes, and snippets.

@RichardLitt
Created May 6, 2016 21:46
Show Gist options
  • Select an option

  • Save RichardLitt/36bbcad71bd5d85bbd1121ad590e61ae to your computer and use it in GitHub Desktop.

Select an option

Save RichardLitt/36bbcad71bd5d85bbd1121ad590e61ae to your computer and use it in GitHub Desktop.
var logLsCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "List the logging subsystems.",
ShortDescription: `
'ipfs log ls' is a utility command used to list the logging
subsystems of a running daemon.
`,
},
Run: func(req cmds.Request, res cmds.Response) {
output := strings.Join(logging.GetSubsystems(), "\n")
res.SetOutput(&MessageOutput{output + "\n"})
fmt.Println(reflect.TypeOf(res))
},
Marshalers: cmds.MarshalerMap{
cmds.Text: MessageTextMarshaler,
},
Type: MessageOutput{},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment