31 lines
615 B
Go
31 lines
615 B
Go
|
package tasks
|
||
|
|
||
|
import (
|
||
|
"ocl/portainer-devtool/configs"
|
||
|
"ocl/portainer-devtool/tasks/subtasks"
|
||
|
)
|
||
|
|
||
|
type ListDevToolCommandTask struct {
|
||
|
Config *configs.Config
|
||
|
}
|
||
|
|
||
|
func NewListDevToolCommandTask(cfg *configs.Config) *ListDevToolCommandTask {
|
||
|
return &ListDevToolCommandTask{
|
||
|
Config: cfg,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (task *ListDevToolCommandTask) Execute() error {
|
||
|
subTaskItems := []Tasker{
|
||
|
subtasks.NewListVolumeSubTask(task.Config),
|
||
|
}
|
||
|
|
||
|
ListCommandMenu(subTaskItems, "Which management commands do you want to choose:")
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (task *ListDevToolCommandTask) String() string {
|
||
|
return "List Dev Tool Commands"
|
||
|
}
|