aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/smartystreets/goconvey/convey/gotest/utils.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2019-10-23 23:03:17 -0700
committerGitHub <noreply@github.com>2019-10-23 23:03:17 -0700
commit613139e7bef81d3573e7988a47eb6765f3de347a (patch)
tree49de7277898d3ff47a122c072568edb8ed4c9ac9 /vendor/github.com/smartystreets/goconvey/convey/gotest/utils.go
parentfb100dbf98f02e4c631d142ff0f52ec29ee2f00c (diff)
Enable Go modules (#5835)
* Remove vendor * Enable Go modules * ci: add command to fetch dependencies * ci: update setting * ci: update settings * Require Go 1.11 * Rename module name to gogs.io/gogs
Diffstat (limited to 'vendor/github.com/smartystreets/goconvey/convey/gotest/utils.go')
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/gotest/utils.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/vendor/github.com/smartystreets/goconvey/convey/gotest/utils.go b/vendor/github.com/smartystreets/goconvey/convey/gotest/utils.go
deleted file mode 100644
index 167c8fb7..00000000
--- a/vendor/github.com/smartystreets/goconvey/convey/gotest/utils.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Package gotest contains internal functionality. Although this package
-// contains one or more exported names it is not intended for public
-// consumption. See the examples package for how to use this project.
-package gotest
-
-import (
- "runtime"
- "strings"
-)
-
-func ResolveExternalCaller() (file string, line int, name string) {
- var caller_id uintptr
- callers := runtime.Callers(0, callStack)
-
- for x := 0; x < callers; x++ {
- caller_id, file, line, _ = runtime.Caller(x)
- if strings.HasSuffix(file, "_test.go") || strings.HasSuffix(file, "_tests.go") {
- name = runtime.FuncForPC(caller_id).Name()
- return
- }
- }
- file, line, name = "<unknown file>", -1, "<unknown name>"
- return // panic?
-}
-
-const maxStackDepth = 100 // This had better be enough...
-
-var callStack []uintptr = make([]uintptr, maxStackDepth, maxStackDepth)