Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
don't ignore stdout.Write err (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
blico authored Mar 13, 2020
1 parent f9b4ad1 commit 064e67a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mockgen/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ func reflectMode(importPath string, symbols []string) (*model.Package, error) {
}

if *progOnly {
_, _ = os.Stdout.Write(program)
if _, err := os.Stdout.Write(program); err != nil {
return nil, err
}
os.Exit(0)
}

Expand Down

0 comments on commit 064e67a

Please sign in to comment.