Skip to content

Commit

Permalink
review comment: errors.Is(nil,...) is safe and false
Browse files Browse the repository at this point in the history
Co-authored-by: ccoVeille <[email protected]>
  • Loading branch information
ldemailly and ccoVeille committed Aug 8, 2024
1 parent bb0d5a1 commit 22e460e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (t *Terminal) ReadLine() (string, error) {
c, err := t.term.ReadLine()
// That error isn't an error that needs to be propagated,
// it's just to allow copy/paste without autocomplete.
if err != nil && errors.Is(err, term.ErrPasteIndicator) {
if errors.Is(err, term.ErrPasteIndicator) {
return c, nil
}
return c, err
Expand Down

0 comments on commit 22e460e

Please sign in to comment.