Skip to content

Commit 975e5eb

Browse files
committed
fix: explicitly ignore writer errs
1 parent 950cb6b commit 975e5eb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

internal/codegen/file.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ type File struct {
1111

1212
func (f *File) P(v ...interface{}) {
1313
for _, x := range v {
14-
fmt.Fprint(&f.buf, x)
14+
_, _ = fmt.Fprint(&f.buf, x)
1515
}
16-
fmt.Fprintln(&f.buf)
16+
_, _ = fmt.Fprintln(&f.buf)
1717
}
1818

1919
func (f *File) Content() []byte {

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
func main() {
1515
if err := run(); err != nil {
16-
fmt.Fprintf(os.Stderr, "%s: %v\n", filepath.Base(os.Args[0]), err)
16+
_, _ = fmt.Fprintf(os.Stderr, "%s: %v\n", filepath.Base(os.Args[0]), err)
1717
os.Exit(1)
1818
}
1919
}

0 commit comments

Comments
 (0)