aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorch3nnn <chenyinren@vip.qq.com>2023-08-16 12:28:11 +0000
committerGopher Robot <gobot@golang.org>2023-08-17 16:21:46 +0000
commit7af3107632bbc761aef3ae453f174341f7a9184b (patch)
tree82429b47e1a5ccec23c5322da7980a2e3f049ee2 /src
parent99b80993f607e1c6e2f4c14445de103ba6856cfc (diff)
downloadgo-7af3107632bbc761aef3ae453f174341f7a9184b.tar.gz
fmt: fix receiver names are different
"buffer" call the receiver "b" in other method, don't call it "bp" in another. Keep the same receiver names, as prescribed in Go Code Review Comments (https://go.dev/s/style#receiver-names). Change-Id: I9fafc799a9e4102419ed743b941bca74e908f5c0 GitHub-Last-Rev: c8b851d372f3966e3c5eec7c331ad05aacb1ebda GitHub-Pull-Request: golang/go#62066 Reviewed-on: https://go-review.googlesource.com/c/go/+/520016 Auto-Submit: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/fmt/print.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fmt/print.go b/src/fmt/print.go
index 9c3bd3efec..efbe3f193e 100644
--- a/src/fmt/print.go
+++ b/src/fmt/print.go
@@ -112,8 +112,8 @@ func (b *buffer) writeByte(c byte) {
*b = append(*b, c)
}
-func (bp *buffer) writeRune(r rune) {
- *bp = utf8.AppendRune(*bp, r)
+func (b *buffer) writeRune(r rune) {
+ *b = utf8.AppendRune(*b, r)
}
// pp is used to store a printer's state and is reused with sync.Pool to avoid allocations.