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