Remove redundant if err != nil check (#1202)
* Remove redundant if err != nil check * Return e.EncodeToken instead of create a new variable
This commit is contained in:
parent
05547037e4
commit
a816f9e9db
@ -111,10 +111,8 @@ func (h xmlmap) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := e.EncodeToken(xml.EndElement{Name: start.Name}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
return e.EncodeToken(xml.EndElement{Name: start.Name})
|
||||
}
|
||||
|
||||
func TestRenderXML(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user