From 938da9a83a08507a6f8b88d4b4b59f08574430c5 Mon Sep 17 00:00:00 2001 From: Cyrill Troxler Date: Thu, 15 Aug 2024 15:27:02 +0200 Subject: [PATCH] fix: error check order this came up in staticcheck --- api/log/client.go | 2 +- create/application.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/log/client.go b/api/log/client.go index 58f991f..edd966a 100644 --- a/api/log/client.go +++ b/api/log/client.go @@ -201,7 +201,7 @@ func (c *Client) TailQuery(ctx context.Context, delayFor time.Duration, out outp continue } - if websocket.IsCloseError(err, websocket.CloseNormalClosure) || errors.Is(websocket.ErrCloseSent, err) { + if websocket.IsCloseError(err, websocket.CloseNormalClosure) || errors.Is(err, websocket.ErrCloseSent) { return nil } diff --git a/create/application.go b/create/application.go index 5a8c8cf..a0b0020 100644 --- a/create/application.go +++ b/create/application.go @@ -400,7 +400,7 @@ func waitForBuildFinish(ctx context.Context, app *apps.Application, logClient *l go func() { if _, err := p.Run(); err != nil { - if !errors.Is(tea.ErrProgramKilled, err) { + if !errors.Is(err, tea.ErrProgramKilled) { fmt.Fprintf(os.Stderr, "error running tea program: %s", err) } }