You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
602 B
Go
33 lines
602 B
Go
![]()
2 years ago
|
package commands
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/docker/buildx/monitor/types"
|
||
|
"github.com/docker/buildx/monitor/utils"
|
||
|
)
|
||
|
|
||
|
type ClearallCmd struct {
|
||
|
m types.Monitor
|
||
|
}
|
||
|
|
||
|
func NewClearallCmd(m types.Monitor) types.Command {
|
||
|
return &ClearallCmd{m}
|
||
|
}
|
||
|
|
||
|
func (cm *ClearallCmd) Info() types.CommandInfo {
|
||
|
return types.CommandInfo{
|
||
|
Name: "clearall",
|
||
|
HelpMessage: "clears all breakpoints",
|
||
|
HelpMessageLong: `
|
||
|
Usage:
|
||
|
clearall
|
||
|
`,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (cm *ClearallCmd) Exec(ctx context.Context, args []string) error {
|
||
|
utils.SetDefaultBreakpoints(cm.m.GetWalkerController().Breakpoints())
|
||
|
return nil
|
||
|
}
|