I create a err in my package and compare it with io.EOF, but the == operand is false. But their type and value are same? Why == operand return false?
func TestErr(t *testing.T) {
err := errors.New("EOF")
t.Log(err == io.EOF)
t.Logf("io err:%T,%v,%p", io.EOF, io.EOF, io.EOF)
t.Logf("my err:%T,%v,%p", err, err, err)
}
These two error are not equal because their pointers are not equal