Deep equals doesn't appear to check embedded values:
package main
import (
"fmt"
"github.com/go-test/deep"
)
type sub struct{
subvar string
}
type top struct{
sub
}
func main() {
val1 := top{sub: sub{subvar: "x"}}
val2 := top{sub: sub{subvar: "y"}}
fmt.Println(deep.Equal(val1, val1)) // no diffs, fine
fmt.Println(deep.Equal(val1, val2)) // no diffs, not so fine
}
Deep equals doesn't appear to check embedded values: