mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 02:30:39 +08:00
Merge pull request #2606 from ipfs/feature/diag-cmds-grammar
Fixed up comments for `diag cmds`
This commit is contained in:
@ -13,7 +13,7 @@ import (
|
|||||||
|
|
||||||
var ActiveReqsCmd = &cmds.Command{
|
var ActiveReqsCmd = &cmds.Command{
|
||||||
Helptext: cmds.HelpText{
|
Helptext: cmds.HelpText{
|
||||||
Tagline: "List commands run on this ipfs node",
|
Tagline: "List commands run on this ipfs node.",
|
||||||
ShortDescription: `
|
ShortDescription: `
|
||||||
Lists running and recently run commands.
|
Lists running and recently run commands.
|
||||||
`,
|
`,
|
||||||
@ -22,7 +22,7 @@ Lists running and recently run commands.
|
|||||||
res.SetOutput(req.InvocContext().ReqLog.Report())
|
res.SetOutput(req.InvocContext().ReqLog.Report())
|
||||||
},
|
},
|
||||||
Options: []cmds.Option{
|
Options: []cmds.Option{
|
||||||
cmds.BoolOption("v", "verbose", "print more verbose output"),
|
cmds.BoolOption("v", "verbose", "Print more verbose output."),
|
||||||
},
|
},
|
||||||
Subcommands: map[string]*cmds.Command{
|
Subcommands: map[string]*cmds.Command{
|
||||||
"clear": clearInactiveCmd,
|
"clear": clearInactiveCmd,
|
||||||
@ -87,7 +87,7 @@ Lists running and recently run commands.
|
|||||||
|
|
||||||
var clearInactiveCmd = &cmds.Command{
|
var clearInactiveCmd = &cmds.Command{
|
||||||
Helptext: cmds.HelpText{
|
Helptext: cmds.HelpText{
|
||||||
Tagline: "Clear inactive requests from the log",
|
Tagline: "Clear inactive requests from the log.",
|
||||||
},
|
},
|
||||||
Run: func(req cmds.Request, res cmds.Response) {
|
Run: func(req cmds.Request, res cmds.Response) {
|
||||||
req.InvocContext().ReqLog.ClearInactive()
|
req.InvocContext().ReqLog.ClearInactive()
|
||||||
@ -96,10 +96,10 @@ var clearInactiveCmd = &cmds.Command{
|
|||||||
|
|
||||||
var setRequestClearCmd = &cmds.Command{
|
var setRequestClearCmd = &cmds.Command{
|
||||||
Helptext: cmds.HelpText{
|
Helptext: cmds.HelpText{
|
||||||
Tagline: "Set how long to keep inactive requests in the log",
|
Tagline: "Set how long to keep inactive requests in the log.",
|
||||||
},
|
},
|
||||||
Arguments: []cmds.Argument{
|
Arguments: []cmds.Argument{
|
||||||
cmds.StringArg("time", true, false, "time to keep inactive requests in log"),
|
cmds.StringArg("time", true, false, "Time to keep inactive requests in log."),
|
||||||
},
|
},
|
||||||
Run: func(req cmds.Request, res cmds.Response) {
|
Run: func(req cmds.Request, res cmds.Response) {
|
||||||
tval, err := time.ParseDuration(req.Arguments()[0])
|
tval, err := time.ParseDuration(req.Arguments()[0])
|
||||||
|
Reference in New Issue
Block a user