mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
testing: add wrapper methods so the godoc output lists all methods
To be deleted when godoc catches up. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5504079
This commit is contained in:
parent
4a8ea4ae94
commit
416afcb411
3 changed files with 109 additions and 3 deletions
|
|
@ -90,7 +90,7 @@ func Short() bool {
|
|||
// If addFileLine is true, it also prefixes the string with the file and line of the call site.
|
||||
func decorate(s string, addFileLine bool) string {
|
||||
if addFileLine {
|
||||
_, file, line, ok := runtime.Caller(3) // decorate + log + public function.
|
||||
_, file, line, ok := runtime.Caller(4) // decorate + log + public function.
|
||||
if ok {
|
||||
// Truncate file name at last file name separator.
|
||||
if index := strings.LastIndex(file, "/"); index >= 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue