Skip to content

Commit bf222ed

Browse files
committed
Use errors.Is() rather than comparing errors using ==
Humor the linter.
1 parent e105328 commit bf222ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

git-sizer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func mainImplementation(stdout, stderr io.Writer, args []string) error {
190190

191191
err = flags.Parse(args)
192192
if err != nil {
193-
if err == pflag.ErrHelp {
193+
if errors.Is(err, pflag.ErrHelp) {
194194
return nil
195195
}
196196
return err

internal/pipe/pipeline.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ func (p *Pipeline) Wait() error {
204204
finishedEarly = false
205205
continue
206206

207-
case err == FinishEarly:
207+
case errors.Is(err, FinishEarly):
208208
// We ignore `FinishEarly` errors because that is how a
209209
// stage informs us that it intentionally finished early.
210210
// Moreover, if we see a `FinishEarly` error, ignore any

0 commit comments

Comments
 (0)