Skip to content

Commit

Permalink
cmd/doc: fix inconsistent receiver name
Browse files Browse the repository at this point in the history
The ToText method of Package is the only one with a receiver declared
'p'; all the rest have 'pkg'. Fix it to be consistent.

Change-Id: I2b47c719f4f6f8d87336316b7f80deb1b49e17dc
GitHub-Last-Rev: 7d273b4
GitHub-Pull-Request: #64912
Reviewed-on: https://go-review.googlesource.com/c/go/+/553335
Run-TryBot: Rob Pike <r@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
  • Loading branch information
MehdiMstv authored and gopherbot committed Jan 8, 2024
1 parent 8eaa793 commit b702e04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cmd/doc/pkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ type Package struct {
buf pkgBuffer
}

func (p *Package) ToText(w io.Writer, text, prefix, codePrefix string) {
d := p.doc.Parser().Parse(text)
pr := p.doc.Printer()
func (pkg *Package) ToText(w io.Writer, text, prefix, codePrefix string) {
d := pkg.doc.Parser().Parse(text)
pr := pkg.doc.Printer()
pr.TextPrefix = prefix
pr.TextCodePrefix = codePrefix
w.Write(pr.Text(d))
Expand Down

0 comments on commit b702e04

Please sign in to comment.