mirror of https://github.com/gin-gonic/gin.git
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
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err := e.EncodeToken(xml.EndElement{Name: start.Name}); err != nil {
|
|
||||||
return err
|
return e.EncodeToken(xml.EndElement{Name: start.Name})
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRenderXML(t *testing.T) {
|
func TestRenderXML(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue