code: func Error(t TestingT, err error, msgAndArgs ...interface{}) bool {
  	if h, ok := t.(tHelper); ok {
  		h.Helper()
  	}
  
  	if err == nil {
  		return Fail(t, "An error is expected but got nil.", msgAndArgs...)
  	}
  
  	return true
  }
docs: // Error asserts that a function returned an error (i.e. not `nil`).
  //
  //   actualObj, err := SomeFunction()
  //   if assert.Error(t, err) {
  //	   assert.Equal(t, expectedError, err)
  //   }