Go package to provide an intuitive set of strongly typed assertions for use in unit testing.
AssertG takes inspiration from AssertJ (an assertion library for Java) and Testify (a toolkit with common assertions for Go).
Example:
import (
"testing"
"github.com/skhome/assertg/assert"
)
func TestSomething(t *testing.T) {
assert.ThatString(t, "foobar").
IsNotEmpty().
StartsWith("foo").
EndsWith("bar")
assert.ThatSlice(t, []int{2, 4, 6}).
HasSize(3).
HasAllMatch(func(num int) bool { return num % 2 == 0 })
}