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:
Rob Pike 2011-12-22 17:17:19 -08:00
parent 4a8ea4ae94
commit 416afcb411
3 changed files with 109 additions and 3 deletions

View file

@ -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 {