Skip to content

Commit c5fe904

Browse files
committed
update godoc
1 parent 297d9e8 commit c5fe904

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

errors.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@
5151
// type Stacktrace interface {
5252
// Stacktrace() []Frame
5353
// }
54+
//
55+
// The Frame type represents a call site in the stacktrace. Frame supports
56+
// the fmt.Formatter interface that can be used for printing information about
57+
// the stacktrace of this error. For example:
58+
//
59+
// if err, ok := err.(Stacktrace); ok {
60+
// for _, f := range err.Stacktrace() {
61+
// fmt.Printf("%+s:%d", f)
62+
// }
63+
// }
64+
//
65+
// See the documentation for Frame.Format for more details.
5466
package errors
5567

5668
import (

0 commit comments

Comments
 (0)