Hi! I was trying the following code, but it does not compile. How can I check if a generic value is its zero value. More broadly, can you explain where this issue comes from? ```go type MemoryRepository[E identifiable.Identifiable] struct { elements []E }
func (repo MemoryRepository[E]) Find(ID string) (E, error) { elem, _ := repo.findWithIndex(ID) if elem == nil { return elem, fmt.Errorf("element with id '%v' does not exist", ID) } return elem, nil } ``` I should (and will) just use an error to check for proper execution, that code was written pretty late in the night! But now I'm curious about the semantics this code butts against -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/ab78002f-eba3-46e6-825e-20f56217586en%40googlegroups.com.