mirror of
https://github.com/golang/go.git
synced 2025-11-09 05:01:01 +00:00
all: remove some unused result params
Most of these are return values that were part of a receiving parameter, so they're still accessible. A few others are not, but those have never had a use. Found with github.com/mvdan/unparam, after Kevin Burke's suggestion that the tool should also warn about unused result parameters. Change-Id: Id8b5ed89912a99db22027703a88bd94d0b292b8b Reviewed-on: https://go-review.googlesource.com/55910 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
0c4d035ca8
commit
5d39af9d9b
7 changed files with 27 additions and 37 deletions
|
|
@ -871,8 +871,7 @@ func (w *reflectWithString) resolve() error {
|
|||
}
|
||||
|
||||
// NOTE: keep in sync with stringBytes below.
|
||||
func (e *encodeState) string(s string, escapeHTML bool) int {
|
||||
len0 := e.Len()
|
||||
func (e *encodeState) string(s string, escapeHTML bool) {
|
||||
e.WriteByte('"')
|
||||
start := 0
|
||||
for i := 0; i < len(s); {
|
||||
|
|
@ -944,12 +943,10 @@ func (e *encodeState) string(s string, escapeHTML bool) int {
|
|||
e.WriteString(s[start:])
|
||||
}
|
||||
e.WriteByte('"')
|
||||
return e.Len() - len0
|
||||
}
|
||||
|
||||
// NOTE: keep in sync with string above.
|
||||
func (e *encodeState) stringBytes(s []byte, escapeHTML bool) int {
|
||||
len0 := e.Len()
|
||||
func (e *encodeState) stringBytes(s []byte, escapeHTML bool) {
|
||||
e.WriteByte('"')
|
||||
start := 0
|
||||
for i := 0; i < len(s); {
|
||||
|
|
@ -1021,7 +1018,6 @@ func (e *encodeState) stringBytes(s []byte, escapeHTML bool) int {
|
|||
e.Write(s[start:])
|
||||
}
|
||||
e.WriteByte('"')
|
||||
return e.Len() - len0
|
||||
}
|
||||
|
||||
// A field represents a single field found in a struct.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue