diff options
author | Martin Möhrmann <moehrmann@google.com> | 2018-06-01 19:25:57 +0200 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-08-22 19:44:26 +0000 |
commit | b0dc54697ba34494a4d77e8d3e446070fc7b223b (patch) | |
tree | 04afa387932cdfc751802b4bf6e50f5ba9643941 /src/runtime/traceback.go | |
parent | 2fad8b219ff9f13f10396c97c0a3bca5c6153d78 (diff) | |
download | go-b0dc54697ba34494a4d77e8d3e446070fc7b223b.tar.gz go-b0dc54697ba34494a4d77e8d3e446070fc7b223b.zip |
runtime: replace calls to hasprefix with hasPrefix
The hasprefix function is redundant and can be removed since it has
the same implementation as hasPrefix modulo variable names.
Fixes #25688
Change-Id: I499cc24a2b5c38d1301718a4e66f555fd138386f
Reviewed-on: https://go-review.googlesource.com/115835
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
Diffstat (limited to 'src/runtime/traceback.go')
-rw-r--r-- | src/runtime/traceback.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go index d8c225d975..a1f32016b9 100644 --- a/src/runtime/traceback.go +++ b/src/runtime/traceback.go @@ -843,7 +843,7 @@ func showfuncinfo(f funcInfo, firstFrame, elideWrapper bool) bool { return true } - return contains(name, ".") && (!hasprefix(name, "runtime.") || isExportedRuntime(name)) + return contains(name, ".") && (!hasPrefix(name, "runtime.") || isExportedRuntime(name)) } // isExportedRuntime reports whether name is an exported runtime function. @@ -1022,7 +1022,7 @@ func isSystemGoroutine(gp *g) bool { // back into user code. return !fingRunning } - return hasprefix(funcname(f), "runtime.") + return hasPrefix(funcname(f), "runtime.") } // SetCgoTraceback records three C functions to use to gather |