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'.
  • Loading branch information
MehdiMstv committed Jan 6, 2024
1 parent b25f555 commit 7d273b4
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 7d273b4

Please sign in to comment.