mirror of
https://github.com/golang/go
synced 2024-11-18 21:44:45 -07:00
encoding/xml: remove unused start parameter
Found by github.com/mvdan/unparam. Change-Id: I5a6664cceeba1cf1c2f3236ddf4db5ce7a64b02a Reviewed-on: https://go-review.googlesource.com/37835 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
de3669901a
commit
694f9e36aa
@ -211,7 +211,7 @@ func (p *Decoder) unmarshalInterface(val Unmarshaler, start *StartElement) error
|
|||||||
// unmarshalTextInterface unmarshals a single XML element into val.
|
// unmarshalTextInterface unmarshals a single XML element into val.
|
||||||
// The chardata contained in the element (but not its children)
|
// The chardata contained in the element (but not its children)
|
||||||
// is passed to the text unmarshaler.
|
// is passed to the text unmarshaler.
|
||||||
func (p *Decoder) unmarshalTextInterface(val encoding.TextUnmarshaler, start *StartElement) error {
|
func (p *Decoder) unmarshalTextInterface(val encoding.TextUnmarshaler) error {
|
||||||
var buf []byte
|
var buf []byte
|
||||||
depth := 1
|
depth := 1
|
||||||
for depth > 0 {
|
for depth > 0 {
|
||||||
@ -341,13 +341,13 @@ func (p *Decoder) unmarshal(val reflect.Value, start *StartElement) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if val.CanInterface() && val.Type().Implements(textUnmarshalerType) {
|
if val.CanInterface() && val.Type().Implements(textUnmarshalerType) {
|
||||||
return p.unmarshalTextInterface(val.Interface().(encoding.TextUnmarshaler), start)
|
return p.unmarshalTextInterface(val.Interface().(encoding.TextUnmarshaler))
|
||||||
}
|
}
|
||||||
|
|
||||||
if val.CanAddr() {
|
if val.CanAddr() {
|
||||||
pv := val.Addr()
|
pv := val.Addr()
|
||||||
if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) {
|
if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) {
|
||||||
return p.unmarshalTextInterface(pv.Interface().(encoding.TextUnmarshaler), start)
|
return p.unmarshalTextInterface(pv.Interface().(encoding.TextUnmarshaler))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user