From c6b07fe328456b287de788bbb5830246843096fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Jime=CC=81nez?= Date: Sat, 9 Jan 2016 17:58:28 +0100 Subject: [PATCH] Unexport FailNower failNower is for internal use and we must not export it. Since we just exported it a couple of days ago is unlikely this breking change will affect anybody. --- assert/assertions.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assert/assertions.go b/assert/assertions.go index 4be88a3..d7c16c5 100644 --- a/assert/assertions.go +++ b/assert/assertions.go @@ -23,10 +23,6 @@ type TestingT interface { Errorf(format string, args ...interface{}) } -type FailNower interface { - FailNow() -} - // Comparison a custom function that returns true on success and false on failure type Comparison func() (success bool) @@ -185,6 +181,10 @@ func indentMessageLines(message string, tabs int) string { return outBuf.String() } +type failNower interface { + FailNow() +} + // FailNow fails test func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool { Fail(t, failureMessage, msgAndArgs...) @@ -195,7 +195,7 @@ func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool // TestingT. // See issue #263 - if t, ok := t.(FailNower); ok { + if t, ok := t.(failNower); ok { t.FailNow() } else { panic("test failed and t is missing `FailNow()`")