File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ func ExampleThrowPanic() {
4646 // Function that throws a panic
4747 thrower := func () (err error ) {
4848 defer stackerr .Recover (& err )
49-
49+
5050 // ThrowPanic wraps the error and panics
5151 stackerr .ThrowPanic (errors .New ("critical failure" ))
5252 return nil
@@ -77,9 +77,9 @@ func Example_configuration() {
7777
7878 // Reset config for other tests
7979 stackerr .Config .Output = os .Stderr
80-
80+
8181 fmt .Println ("Done" )
82-
82+
8383 // Output:
8484 // Done
8585}
Original file line number Diff line number Diff line change @@ -89,13 +89,13 @@ func TestMaxStackDepth(t *testing.T) {
8989
9090func TestPathReplacement (t * testing.T ) {
9191 defer resetConfig ()
92-
92+
9393 // We'll replace the path to the test file with something unique
9494 // Since we don't know the absolute path easily in test without runtime.Caller,
9595 // let's just use a replacement that likely matches part of the path.
9696 // We know the file is stackerr_test.go.
9797 // But the library does simple string replacement on the file path.
98-
98+
9999 // Let's assume the stack trace contains "stackerr_test.go".
100100 // We want to replace "stackerr" with "replaced_lib".
101101 stackerr .Config .PathReplacements = map [string ]string {
@@ -138,7 +138,7 @@ func TestCustomOutput(t *testing.T) {
138138func TestRecoverStandardError (t * testing.T ) {
139139 defer resetConfig ()
140140 var err error = errors .New ("standard error" )
141-
141+
142142 func () {
143143 defer stackerr .Recover (& err )
144144 }()
@@ -155,7 +155,7 @@ func TestRecoverStandardError(t *testing.T) {
155155func TestRecoverNilError (t * testing.T ) {
156156 defer resetConfig ()
157157 var err error
158-
158+
159159 func () {
160160 defer stackerr .Recover (& err )
161161 }()
You can’t perform that action at this time.
0 commit comments