-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #190 from dogmatiq/location
Move `panicx.Location` into its own package.
- Loading branch information
Showing
14 changed files
with
166 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Package location contains utilities for obtaining the function, file and line | ||
// number of various Go types and values. | ||
package location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package location_test | ||
|
||
import ( | ||
"reflect" | ||
"testing" | ||
|
||
"github.com/onsi/ginkgo" | ||
"github.com/onsi/gomega" | ||
) | ||
|
||
func TestSuite(t *testing.T) { | ||
type tag struct{} | ||
gomega.RegisterFailHandler(ginkgo.Fail) | ||
ginkgo.RunSpecs(t, reflect.TypeOf(tag{}).PkgPath()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package location_test | ||
|
||
// This file contains definitions used within tests that check for specific line | ||
// numbers. To minimize test disruption edit this file as infrequently as | ||
// possible. | ||
// | ||
// New additions should always be made at the end so that the line numbers of | ||
// existing definitions do not change. The padding below can be removed as | ||
// imports statements added. | ||
|
||
import ( | ||
. "github.com/dogmatiq/testkit/internal/location" | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
// import padding | ||
) | ||
|
||
func doNothing() {} | ||
func doPanic() { panic("<panic>") } | ||
func ofCallLayer1() Location { return OfCall() } | ||
func ofCallLayer2() Location { return ofCallLayer1() } | ||
|
||
type ofMethodT struct{} | ||
|
||
func (ofMethodT) Method() {} |
Oops, something went wrong.