Skip to content
Myr

Remove redundant if err != nil check (#1202)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Remove redundant if err != nil check * Return e.EncodeToken instead of create a new variable

authored by Weilin Shi · committed by Bo-Yi Wu · parent 0554703 · Browse files · 1 file+2 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−4 removed

  • other:+2 added−4 removed

1 file+2 added−4 removed

modified:render/render_test.go+2 added-4 removed
109 unmodified lines
110 if err := e.EncodeElement(value, elem); err != nil {111 return err112 }113 }114 if err := e.EncodeToken(xml.EndElement{Name: start.Name}); err != nil {115 return err116 }117 return nil114115 return e.EncodeToken(xml.EndElement{Name: start.Name})116}117118func TestRenderXML(t *testing.T) {119 w := httptest.NewRecorder()
57 unmodified lines