From dffa368e70d1ab564a435b89f9dcaf5f98e614f2 Mon Sep 17 00:00:00 2001 From: Gadzhi Kharkharov Date: Thu, 16 Sep 2021 15:51:37 +0300 Subject: [PATCH] move send switch case --- cmd/send.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/send.go b/cmd/send.go index 2de7c1c..623fdcb 100644 --- a/cmd/send.go +++ b/cmd/send.go @@ -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 { @@ -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