issue-9: fixed unit tests
This commit is contained in:
parent
24304d21c3
commit
aa7ec9f863
|
@ -50,7 +50,7 @@ func main() {
|
|||
cmdController := commandctrl.NewCommandController()
|
||||
cmdController.AddCommands(&commandctrl.CommandList{
|
||||
Commands: map[string]commandctrl.Command{
|
||||
"cd": func(args []string) tea.Msg {
|
||||
"cd": func(ec commandctrl.ExecContext, args []string) tea.Msg {
|
||||
return ctrl.ChangePrefix(args[0])
|
||||
},
|
||||
},
|
||||
|
|
|
@ -32,13 +32,13 @@ func NewModel(controller *controllers.SSMController, cmdController *commandctrl.
|
|||
|
||||
cmdController.AddCommands(&commandctrl.CommandList{
|
||||
Commands: map[string]commandctrl.Command{
|
||||
"clone": func(args []string) tea.Msg {
|
||||
"clone": func(ec commandctrl.ExecContext, args []string) tea.Msg {
|
||||
if currentParam := ssmList.CurrentParameter(); currentParam != nil {
|
||||
return controller.Clone(*currentParam)
|
||||
}
|
||||
return events.Error(errors.New("no parameter selected"))
|
||||
},
|
||||
"delete": func(args []string) tea.Msg {
|
||||
"delete": func(ec commandctrl.ExecContext, args []string) tea.Msg {
|
||||
if currentParam := ssmList.CurrentParameter(); currentParam != nil {
|
||||
return controller.DeleteParameter(*currentParam)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue