monitor: add long help for commands

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
This commit is contained in:
Kohei Tokunaga
2023-05-29 23:16:27 +09:00
parent 17bdbbd3c3
commit cafeedba79
10 changed files with 118 additions and 19 deletions

View File

@ -20,7 +20,17 @@ func NewAttachCmd(m types.Monitor, stdout io.WriteCloser) types.Command {
}
func (cm *AttachCmd) Info() types.CommandInfo {
return types.CommandInfo{HelpMessage: "attach to a buildx server or a process in the container"}
return types.CommandInfo{
Name: "attach",
HelpMessage: "attach to a buildx server or a process in the container",
HelpMessageLong: `
Usage:
attach ID
ID is for a session (visible via list command) or a process (visible via ps command).
If you attached to a process, use Ctrl-c-a for switching the monitor to that process's STDIO.
`,
}
}
func (cm *AttachCmd) Exec(ctx context.Context, args []string) error {