Skip to content

Commit 30e20cc

Browse files
committed
Fix errcheck failures
Change-Id: Ic94b340796ee3ead1f1f9ab60726483ff741dd12
1 parent 8fa1062 commit 30e20cc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.errcheck-excludes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
(net.Conn).Close
77
encoding/pem.Encode
88
fmt.Fprintf
9+
fmt.Fprint

bson/extjson_builder.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ func ParseExtJSONArray(s string) (*Array, error) {
4343
}
4444

4545
buf := make([]byte, b.RequiredBytes())
46-
b.WriteDocument(buf)
46+
_, err = b.WriteDocument(buf)
47+
if err != nil {
48+
return nil, err
49+
}
4750

4851
doc, err := ReadDocument(buf)
4952
if err != nil {

0 commit comments

Comments
 (0)