Skip to content

Commit 32a80e6

Browse files
committed
style: run gofmt -s to format code
1 parent 1a13b85 commit 32a80e6

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

example_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

stackerr_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ func TestMaxStackDepth(t *testing.T) {
8989

9090
func 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) {
138138
func 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) {
155155
func TestRecoverNilError(t *testing.T) {
156156
defer resetConfig()
157157
var err error
158-
158+
159159
func() {
160160
defer stackerr.Recover(&err)
161161
}()

0 commit comments

Comments
 (0)