This package provides a simple utility function for comparing values in a test. The goal is extreme simplicity:
import (
"testing"
"github.com/nitroshare/compare"
)
func TestSomething(t *testing.T) {
// Second and third parameter are compared and the fourth parameter
// determines if they should match; in this case, they should...
compare.Compare(t, 1, 1, true)
// ...and in this case they should not
compare.Compare(t, 1, 2, false)
}