Skip to content

Commit

Permalink
move send switch case
Browse files Browse the repository at this point in the history
  • Loading branch information
kkga committed Sep 16, 2021
1 parent 4d5e822 commit dffa368
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ func (c *SendCmd) Run() error {
sendCmd := strings.Join(c.fs.Args(), " ")

switch c.allClients {
case false:
// TODO: need to trigger "session not set" error
if err := kak.Send(c.kakContext, sendCmd); err != nil {
return err
}
case true:
sessions, err := kak.Sessions()
if err != nil {
Expand All @@ -45,11 +50,6 @@ func (c *SendCmd) Run() error {
}
}
}
case false:
// TODO: need to trigger "session not set" error
if err := kak.Send(c.kakContext, sendCmd); err != nil {
return err
}
}

return nil
Expand Down

0 comments on commit dffa368

Please sign in to comment.