Skip to content

Commit

Permalink
Optimise template
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Pollett authored and ernesto-jimenez committed Jun 9, 2018
1 parent c679ae2 commit 6c9d18a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions require/require.go.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{.Comment}}
func {{.DocInfo.Name}}(t TestingT, {{.Params}}) {
if h, ok := t.(tHelper); ok { h.Helper() }
if !assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) {
t.FailNow()
if assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) {
return
}
if h, ok := t.(tHelper); ok { h.Helper() }
t.FailNow()
}

0 comments on commit 6c9d18a

Please sign in to comment.