Skip to content

Commit 9cfa41c

Browse files
Seebstklauser
authored andcommitted
os: use Println instead of Printf in example
This message has no format specifiers and no trailing newline. It should use Println for consistency with other examples. Change-Id: I49bd1652f9449fcbdd79c6b689c123090972aab3 Reviewed-on: https://go-review.googlesource.com/127836 Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent c907a75 commit 9cfa41c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/os/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func ExampleFileMode() {
7070
func ExampleIsNotExist() {
7171
filename := "a-nonexistent-file"
7272
if _, err := os.Stat(filename); os.IsNotExist(err) {
73-
fmt.Printf("file does not exist")
73+
fmt.Println("file does not exist")
7474
}
7575
// Output:
7676
// file does not exist

0 commit comments

Comments
 (0)