Skip to content
This repository was archived by the owner on Dec 1, 2021. It is now read-only.

Commit f5db181

Browse files
committed
more examples
1 parent b402999 commit f5db181

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

example_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package errors_test
22

33
import (
44
"fmt"
5+
"os"
56

67
"github.com/pkg/errors"
78
)
@@ -33,3 +34,13 @@ func ExampleCause() {
3334
// Output: outer: middle: inner: error
3435
// error
3536
}
37+
38+
func ExampleFprint() {
39+
err := fn()
40+
errors.Fprint(os.Stdout, err)
41+
42+
// Output: outer
43+
// middle
44+
// inner
45+
// error
46+
}

0 commit comments

Comments
 (0)