Skip to content

Commit 99df400

Browse files
Merge pull request #282 from xpzouying/master
go: check error first
2 parents 3fcc22f + 787b2fd commit 99df400

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/send.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ func main() {
4141
ContentType: "text/plain",
4242
Body: []byte(body),
4343
})
44-
log.Printf(" [x] Sent %s", body)
4544
failOnError(err, "Failed to publish a message")
45+
log.Printf(" [x] Sent %s", body)
4646
}

0 commit comments

Comments
 (0)