Skip to content

Commit

Permalink
fix: error check order
Browse files Browse the repository at this point in the history
this came up in staticcheck
  • Loading branch information
ctrox committed Aug 15, 2024
1 parent d7059bb commit 938da9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/log/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion create/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 938da9a

Please sign in to comment.