{"modulePath":"github.com/GetStream/testify","version":"v1.1.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package require\n\nPackage require implements the same assertions as the \\`assert\\` package but stops test execution when a test fails.\n\n### Example Usage {#hdr-Example_Usage}\n\nThe following is a complete example using require in a standard test function:\n\n\timport (\n\t  \"testing\"\n\t  \"github.com/stretchr/testify/require\"\n\t)\n\n\tfunc TestSomething(t *testing.T) {\n\n\t  var a string = \"Hello\"\n\t  var b string = \"Hello\"\n\n\t  require.Equal(t, a, b, \"The two words should be the same.\")\n\n\t}\n\n### Assertions {#hdr-Assertions}\n\nThe \\`require\\` package have same global functions as in the \\`assert\\` package, but instead of returning a boolean result they call \\`t.FailNow()\\`.\n\nEvery assertion function also takes an optional string message as the final argument, allowing custom error messages to be appended to the message the assertion method outputs.\n\n## Functions\n\n```go\nfunc Condition(t TestingT, comp assert.Comparison, msgAndArgs ...interface{})\n```\nCondition uses a Comparison to assert a complex condition.\n\n```go\nfunc Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{})\n```\nContains asserts that the specified string, list(array, slice...) or map contains the specified substring or element.\n\n\tassert.Contains(t, \"Hello World\", \"World\", \"But 'Hello World' does contain 'World'\")\n\tassert.Contains(t, [\"Hello\", \"World\"], \"World\", \"But [\"Hello\", \"World\"] does contain 'World'\")\n\tassert.Contains(t, {\"Hello\": \"World\"}, \"Hello\", \"But {'Hello': 'World'} does contain 'Hello'\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Empty(t TestingT, object interface{}, msgAndArgs ...interface{})\n```\nEmpty asserts that the specified object is empty.  I.e. nil, \"\", false, 0 or either a slice or a channel with len == 0.\n\n\tassert.Empty(t, obj)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Equal(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{})\n```\nEqual asserts that two objects are equal.\n\n\tassert.Equal(t, 123, 123, \"123 and 123 should be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{})\n```\nEqualError asserts that a function returned an error (i.e. not \\`nil\\`) and that it is equal to the provided error.\n\n\t  actualObj, err := SomeFunction()\n\t  if assert.Error(t, err, \"An error was expected\") {\n\t\t   assert.Equal(t, err, expectedError)\n\t  }\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{})\n```\nEqualValues asserts that two objects are equal or convertable to the same types and equal.\n\n\tassert.EqualValues(t, uint32(123), int32(123), \"123 and 123 should be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Error(t TestingT, err error, msgAndArgs ...interface{})\n```\nError asserts that a function returned an error (i.e. not \\`nil\\`).\n\n\t  actualObj, err := SomeFunction()\n\t  if assert.Error(t, err, \"An error was expected\") {\n\t\t   assert.Equal(t, err, expectedError)\n\t  }\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Exactly(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{})\n```\nExactly asserts that two objects are equal is value and type.\n\n\tassert.Exactly(t, int32(123), int64(123), \"123 and 123 should NOT be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Fail(t TestingT, failureMessage string, msgAndArgs ...interface{})\n```\nFail reports a failure through\n\n```go\nfunc FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{})\n```\nFailNow fails test\n\n```go\nfunc False(t TestingT, value bool, msgAndArgs ...interface{})\n```\nFalse asserts that the specified value is false.\n\n\tassert.False(t, myBool, \"myBool should be false\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{})\n```\nHTTPBodyContains asserts that a specified handler returns a body that contains a string.\n\n\tassert.HTTPBodyContains(t, myHandler, \"www.google.com\", nil, \"I'm Feeling Lucky\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{})\n```\nHTTPBodyNotContains asserts that a specified handler returns a body that does not contain a string.\n\n\tassert.HTTPBodyNotContains(t, myHandler, \"www.google.com\", nil, \"I'm Feeling Lucky\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc HTTPError(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values)\n```\nHTTPError asserts that a specified handler returns an error status code.\n\n\tassert.HTTPError(t, myHandler, \"POST\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values)\n```\nHTTPRedirect asserts that a specified handler returns a redirect status code.\n\n\tassert.HTTPRedirect(t, myHandler, \"GET\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values)\n```\nHTTPSuccess asserts that a specified handler returns a success status code.\n\n\tassert.HTTPSuccess(t, myHandler, \"POST\", \"http://www.google.com\", nil)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{})\n```\nImplements asserts that an object is implemented by the specified interface.\n\n\tassert.Implements(t, (*MyInterface)(nil), new(MyObject), \"MyObject\")\n\n```go\nfunc InDelta(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})\n```\nInDelta asserts that the two numerals are within delta of each other.\n\n\tassert.InDelta(t, math.Pi, (22 / 7.0), 0.01)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc InDeltaSlice(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})\n```\nInDeltaSlice is the same as InDelta, except it compares two slices.\n\n```go\nfunc InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{})\n```\nInEpsilon asserts that expected and actual have a relative error less than epsilon\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})\n```\nInEpsilonSlice is the same as InEpsilon, except it compares two slices.\n\n```go\nfunc IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{})\n```\nIsType asserts that the specified objects are of the same type.\n\n```go\nfunc JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{})\n```\nJSONEq asserts that two JSON strings are equivalent.\n\n\tassert.JSONEq(t, `{\"hello\": \"world\", \"foo\": \"bar\"}`, `{\"foo\": \"bar\", \"hello\": \"world\"}`)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{})\n```\nLen asserts that the specified object has specific length. Len also fails if the object has a type that len() not accept.\n\n\tassert.Len(t, mySlice, 3, \"The size of slice is not 3\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Nil(t TestingT, object interface{}, msgAndArgs ...interface{})\n```\nNil asserts that the specified object is nil.\n\n\tassert.Nil(t, err, \"err should be nothing\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NoError(t TestingT, err error, msgAndArgs ...interface{})\n```\nNoError asserts that a function returned no error (i.e. \\`nil\\`).\n\n\t  actualObj, err := SomeFunction()\n\t  if assert.NoError(t, err) {\n\t\t   assert.Equal(t, actualObj, expectedObj)\n\t  }\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{})\n```\nNotContains asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element.\n\n\tassert.NotContains(t, \"Hello World\", \"Earth\", \"But 'Hello World' does NOT contain 'Earth'\")\n\tassert.NotContains(t, [\"Hello\", \"World\"], \"Earth\", \"But ['Hello', 'World'] does NOT contain 'Earth'\")\n\tassert.NotContains(t, {\"Hello\": \"World\"}, \"Earth\", \"But {'Hello': 'World'} does NOT contain 'Earth'\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{})\n```\nNotEmpty asserts that the specified object is NOT empty.  I.e. not nil, \"\", false, 0 or either a slice or a channel with len == 0.\n\n\tif assert.NotEmpty(t, obj) {\n\t  assert.Equal(t, \"two\", obj[1])\n\t}\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotEqual(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{})\n```\nNotEqual asserts that the specified values are NOT equal.\n\n\tassert.NotEqual(t, obj1, obj2, \"two objects shouldn't be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotNil(t TestingT, object interface{}, msgAndArgs ...interface{})\n```\nNotNil asserts that the specified object is not nil.\n\n\tassert.NotNil(t, err, \"err should be something\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{})\n```\nNotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.\n\n\tassert.NotPanics(t, func(){\n\t  RemainCalm()\n\t}, \"Calling RemainCalm() should NOT panic\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{})\n```\nNotRegexp asserts that a specified regexp does not match a string.\n\n\tassert.NotRegexp(t, regexp.MustCompile(\"starts\"), \"it's starting\")\n\tassert.NotRegexp(t, \"^start\", \"it's not starting\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotZero(t TestingT, i interface{}, msgAndArgs ...interface{})\n```\nNotZero asserts that i is not the zero value for its type and returns the truth.\n\n```go\nfunc Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{})\n```\nPanics asserts that the code inside the specified PanicTestFunc panics.\n\n\tassert.Panics(t, func(){\n\t  GoCrazy()\n\t}, \"Calling GoCrazy() should panic\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{})\n```\nRegexp asserts that a specified regexp matches a string.\n\n\tassert.Regexp(t, regexp.MustCompile(\"start\"), \"it's starting\")\n\tassert.Regexp(t, \"start...$\", \"it's not starting\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc True(t TestingT, value bool, msgAndArgs ...interface{})\n```\nTrue asserts that the specified value is true.\n\n\tassert.True(t, myBool, \"myBool should be true\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc WithinDuration(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{})\n```\nWithinDuration asserts that the two times are within duration delta of each other.\n\n\tassert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second, \"The difference should not be more than 10s\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Zero(t TestingT, i interface{}, msgAndArgs ...interface{})\n```\nZero asserts that i is the zero value for its type and returns the truth.\n\n## Types\n\n```go\ntype Assertions struct {\n\t// contains filtered or unexported fields\n}\n```\nAssertions provides assertion methods around the TestingT interface.\n\n```go\nfunc New(t TestingT) *Assertions\n```\nNew makes a new Assertions object for the specified TestingT.\n\n```go\nfunc (a *Assertions) Condition(comp assert.Comparison, msgAndArgs ...interface{})\n```\nCondition uses a Comparison to assert a complex condition.\n\n```go\nfunc (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{})\n```\nContains asserts that the specified string, list(array, slice...) or map contains the specified substring or element.\n\n\ta.Contains(\"Hello World\", \"World\", \"But 'Hello World' does contain 'World'\")\n\ta.Contains([\"Hello\", \"World\"], \"World\", \"But [\"Hello\", \"World\"] does contain 'World'\")\n\ta.Contains({\"Hello\": \"World\"}, \"Hello\", \"But {'Hello': 'World'} does contain 'Hello'\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{})\n```\nEmpty asserts that the specified object is empty.  I.e. nil, \"\", false, 0 or either a slice or a channel with len == 0.\n\n\ta.Empty(obj)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{})\n```\nEqual asserts that two objects are equal.\n\n\ta.Equal(123, 123, \"123 and 123 should be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{})\n```\nEqualError asserts that a function returned an error (i.e. not \\`nil\\`) and that it is equal to the provided error.\n\n\t  actualObj, err := SomeFunction()\n\t  if assert.Error(t, err, \"An error was expected\") {\n\t\t   assert.Equal(t, err, expectedError)\n\t  }\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{})\n```\nEqualValues asserts that two objects are equal or convertable to the same types and equal.\n\n\ta.EqualValues(uint32(123), int32(123), \"123 and 123 should be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Error(err error, msgAndArgs ...interface{})\n```\nError asserts that a function returned an error (i.e. not \\`nil\\`).\n\n\t  actualObj, err := SomeFunction()\n\t  if a.Error(err, \"An error was expected\") {\n\t\t   assert.Equal(t, err, expectedError)\n\t  }\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{})\n```\nExactly asserts that two objects are equal is value and type.\n\n\ta.Exactly(int32(123), int64(123), \"123 and 123 should NOT be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{})\n```\nFail reports a failure through\n\n```go\nfunc (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{})\n```\nFailNow fails test\n\n```go\nfunc (a *Assertions) False(value bool, msgAndArgs ...interface{})\n```\nFalse asserts that the specified value is false.\n\n\ta.False(myBool, \"myBool should be false\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{})\n```\nHTTPBodyContains asserts that a specified handler returns a body that contains a string.\n\n\ta.HTTPBodyContains(myHandler, \"www.google.com\", nil, \"I'm Feeling Lucky\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{})\n```\nHTTPBodyNotContains asserts that a specified handler returns a body that does not contain a string.\n\n\ta.HTTPBodyNotContains(myHandler, \"www.google.com\", nil, \"I'm Feeling Lucky\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values)\n```\nHTTPError asserts that a specified handler returns an error status code.\n\n\ta.HTTPError(myHandler, \"POST\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values)\n```\nHTTPRedirect asserts that a specified handler returns a redirect status code.\n\n\ta.HTTPRedirect(myHandler, \"GET\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values)\n```\nHTTPSuccess asserts that a specified handler returns a success status code.\n\n\ta.HTTPSuccess(myHandler, \"POST\", \"http://www.google.com\", nil)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{})\n```\nImplements asserts that an object is implemented by the specified interface.\n\n\ta.Implements((*MyInterface)(nil), new(MyObject), \"MyObject\")\n\n```go\nfunc (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})\n```\nInDelta asserts that the two numerals are within delta of each other.\n\n\ta.InDelta(math.Pi, (22 / 7.0), 0.01)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})\n```\nInDeltaSlice is the same as InDelta, except it compares two slices.\n\n```go\nfunc (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{})\n```\nInEpsilon asserts that expected and actual have a relative error less than epsilon\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})\n```\nInEpsilonSlice is the same as InEpsilon, except it compares two slices.\n\n```go\nfunc (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{})\n```\nIsType asserts that the specified objects are of the same type.\n\n```go\nfunc (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{})\n```\nJSONEq asserts that two JSON strings are equivalent.\n\n\ta.JSONEq(`{\"hello\": \"world\", \"foo\": \"bar\"}`, `{\"foo\": \"bar\", \"hello\": \"world\"}`)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{})\n```\nLen asserts that the specified object has specific length. Len also fails if the object has a type that len() not accept.\n\n\ta.Len(mySlice, 3, \"The size of slice is not 3\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{})\n```\nNil asserts that the specified object is nil.\n\n\ta.Nil(err, \"err should be nothing\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NoError(err error, msgAndArgs ...interface{})\n```\nNoError asserts that a function returned no error (i.e. \\`nil\\`).\n\n\t  actualObj, err := SomeFunction()\n\t  if a.NoError(err) {\n\t\t   assert.Equal(t, actualObj, expectedObj)\n\t  }\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{})\n```\nNotContains asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element.\n\n\ta.NotContains(\"Hello World\", \"Earth\", \"But 'Hello World' does NOT contain 'Earth'\")\n\ta.NotContains([\"Hello\", \"World\"], \"Earth\", \"But ['Hello', 'World'] does NOT contain 'Earth'\")\n\ta.NotContains({\"Hello\": \"World\"}, \"Earth\", \"But {'Hello': 'World'} does NOT contain 'Earth'\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{})\n```\nNotEmpty asserts that the specified object is NOT empty.  I.e. not nil, \"\", false, 0 or either a slice or a channel with len == 0.\n\n\tif a.NotEmpty(obj) {\n\t  assert.Equal(t, \"two\", obj[1])\n\t}\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{})\n```\nNotEqual asserts that the specified values are NOT equal.\n\n\ta.NotEqual(obj1, obj2, \"two objects shouldn't be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{})\n```\nNotNil asserts that the specified object is not nil.\n\n\ta.NotNil(err, \"err should be something\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotPanics(f assert.PanicTestFunc, msgAndArgs ...interface{})\n```\nNotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.\n\n\ta.NotPanics(func(){\n\t  RemainCalm()\n\t}, \"Calling RemainCalm() should NOT panic\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{})\n```\nNotRegexp asserts that a specified regexp does not match a string.\n\n\ta.NotRegexp(regexp.MustCompile(\"starts\"), \"it's starting\")\n\ta.NotRegexp(\"^start\", \"it's not starting\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{})\n```\nNotZero asserts that i is not the zero value for its type and returns the truth.\n\n```go\nfunc (a *Assertions) Panics(f assert.PanicTestFunc, msgAndArgs ...interface{})\n```\nPanics asserts that the code inside the specified PanicTestFunc panics.\n\n\ta.Panics(func(){\n\t  GoCrazy()\n\t}, \"Calling GoCrazy() should panic\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{})\n```\nRegexp asserts that a specified regexp matches a string.\n\n\ta.Regexp(regexp.MustCompile(\"start\"), \"it's starting\")\n\ta.Regexp(\"start...$\", \"it's not starting\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) True(value bool, msgAndArgs ...interface{})\n```\nTrue asserts that the specified value is true.\n\n\ta.True(myBool, \"myBool should be true\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{})\n```\nWithinDuration asserts that the two times are within duration delta of each other.\n\n\ta.WithinDuration(time.Now(), time.Now(), 10*time.Second, \"The difference should not be more than 10s\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{})\n```\nZero asserts that i is the zero value for its type and returns the truth.\n\n```go\ntype TestingT interface {\n\tErrorf(format string, args ...interface{})\n\tFailNow()\n}\n```\nTestingT is an interface wrapper around \\*testing.T\n\n","path":"github.com/GetStream/testify/require","name":"require","synopsis":"Package require implements the same assertions as the `assert` package but stops test execution when a test fails.","isRedistributable":true}
