Documentation ¶
Overview ¶
Package assert provides a tool to test error groups:
func TestMyCode(t *testing.T) { err := errors.Group(fmt.Errorf("error 1"), fmt.Errorf("error 2")) assert.EqualErrorGroup(t, err, []string{"error 1", "error 2"}) }
This package requires https://github.com/stretchr/testify.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualErrorGroup ¶
EqualErrorGroup asserts that the given error is a group of errors with the following messages. It asserts the given error is equal to nil whenever `len(msgs) == 0`.
see grouperror.Collection
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.