提交 4b4c81a3 作者: Richard Littauer

Fixed up comments for `diag cmds`

License: MIT
Signed-off-by: 's avatarRichard Littauer <richard.littauer@gmail.com>
上级 9e3b5c3d
...@@ -13,7 +13,7 @@ import ( ...@@ -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. ...@@ -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. ...@@ -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{ ...@@ -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])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论