mirror of
https://github.com/golang/go
synced 2024-11-11 23:40:22 -07:00
io: Add error check to WriteString Example test
This commit is contained in:
parent
2a18e37c4e
commit
59b637db01
@ -103,7 +103,9 @@ func ExampleReadFull() {
|
||||
}
|
||||
|
||||
func ExampleWriteString() {
|
||||
io.WriteString(os.Stdout, "Hello World")
|
||||
if _, err := io.WriteString(os.Stdout, "Hello World"); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// Output: Hello World
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user