Skip to content

Commit cc31822

Browse files
committed
better message in example
1 parent 1790aa0 commit cc31822

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

try/try_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func ExampleIsEOF1() {
105105

106106
func Example_copyFile() {
107107
copyFile := func(src, dst string) (err error) {
108-
defer err2.Handle(&err, "copy %s %s", src, dst)
108+
defer err2.Handle(&err, "copy file %s %s", src, dst)
109109

110110
// These try package helpers are as fast as Check() calls which is as
111111
// fast as `if err != nil {}`
@@ -126,5 +126,5 @@ func Example_copyFile() {
126126
if err != nil {
127127
fmt.Println(err)
128128
}
129-
// Output: copy /notfound/path/file.go /notfound/path/file.bak: open /notfound/path/file.go: no such file or directory
129+
// Output: copy file /notfound/path/file.go /notfound/path/file.bak: open /notfound/path/file.go: no such file or directory
130130
}

0 commit comments

Comments
 (0)