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

Commit 064e67a

Browse files
authoredMar 13, 2020
don't ignore stdout.Write err (#410)
1 parent f9b4ad1 commit 064e67a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎mockgen/reflect.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ func reflectMode(importPath string, symbols []string) (*model.Package, error) {
147147
}
148148

149149
if *progOnly {
150-
_, _ = os.Stdout.Write(program)
150+
if _, err := os.Stdout.Write(program); err != nil {
151+
return nil, err
152+
}
151153
os.Exit(0)
152154
}
153155

0 commit comments

Comments
 (0)