]> Cypherpunks repositories - gostls13.git/commitdiff
os: use Println instead of Printf in example
authorSeebs <seebs@sourcegraph.com>
Fri, 3 Aug 2018 16:50:55 +0000 (11:50 -0500)
committerTobias Klauser <tobias.klauser@gmail.com>
Fri, 24 Aug 2018 07:11:38 +0000 (07:11 +0000)
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 <bradfitz@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/os/example_test.go

index e21415a3fda9ea50afc4c77a163132b8e247a23d..95a4a678171caad10c03cecade6a5b9d865f6dd6 100644 (file)
@@ -70,7 +70,7 @@ func ExampleFileMode() {
 func ExampleIsNotExist() {
        filename := "a-nonexistent-file"
        if _, err := os.Stat(filename); os.IsNotExist(err) {
-               fmt.Printf("file does not exist")
+               fmt.Println("file does not exist")
        }
        // Output:
        // file does not exist