Skip to content

Commit

Permalink
godoc: fix test failure
Browse files Browse the repository at this point in the history
Adjust code to satisfy vet.

Change-Id: I532b4d988eb29b413520de60b8520d9e100b42c9
Reviewed-on: https://go-review.googlesource.com/118557
Run-TryBot: Robert Griesemer <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
griesemer committed Jun 13, 2018
1 parent 8c39fb5 commit 02fcd6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion godoc/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
text = p.Corpus.multipleLines(file, text, arg[0], arg[1])
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.
text = strings.Trim(text, "\n")
Expand Down

0 comments on commit 02fcd6a

Please sign in to comment.