mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
godoc: fix test failure
Adjust code to satisfy vet. Change-Id: I532b4d988eb29b413520de60b8520d9e100b42c9 Reviewed-on: https://go-review.googlesource.com/118557 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
8c39fb57ad
commit
02fcd6aaf1
@ -90,7 +90,7 @@ func (p *Presentation) code(file string, arg ...interface{}) (s string, err erro
|
|||||||
command = fmt.Sprintf("code %q %s %s", file, stringFor(arg[0]), stringFor(arg[1]))
|
command = fmt.Sprintf("code %q %s %s", file, stringFor(arg[0]), stringFor(arg[1]))
|
||||||
text = p.Corpus.multipleLines(file, text, arg[0], arg[1])
|
text = p.Corpus.multipleLines(file, text, arg[0], arg[1])
|
||||||
default:
|
default:
|
||||||
return "", fmt.Errorf("incorrect code invocation: code %q %q", file, arg)
|
return "", fmt.Errorf("incorrect code invocation: code %q [%v, ...] (%d arguments)", file, arg[0], len(arg))
|
||||||
}
|
}
|
||||||
// Trim spaces from output.
|
// Trim spaces from output.
|
||||||
text = strings.Trim(text, "\n")
|
text = strings.Trim(text, "\n")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user