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

Commit 297d9e8

Browse files
committed
fix error in Stacktrace example
1 parent a5b220e commit 297d9e8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ type Stacktrace interface {
3030
```
3131
The `Frame` type represents a call site in the stacktrace.
3232
`Frame` supports the `fmt.Formatter` interface that can be used for printing information about the stacktrace of this error. For example
33-
```
33+
```go
3434
if err, ok := err.(Stacktrace); ok {
35-
fmt.Printf("%+s:%d", err.Stacktrace())
35+
for _, f := range err.Stacktrace() {
36+
fmt.Printf("%+s:%d", f)
37+
}
3638
}
3739
```
3840
See [the documentation for `Frame.Format`](https://godoc.org/github.com/pkg/errors#Frame_Format) for more details.

0 commit comments

Comments
 (0)