title: How to implement generic interfaces?
body: <p>I've just seen Go has incorporated generics in its latest release, and I'm trying to create a small project to understand how it works. I don't seem to figure out how it works apart from very simple functions being now generic. I'd like to be able to do things like this:</p>
  <pre><code>type Dao[RT any] interface {
      FindOne(id string) *RT
  }
  
  type MyDao struct {
  }
  
  type ReturnType struct {
      id int
  }
  
  func (m *MyDao) FindOne(id string) *ReturnType {
      panic(&quot;implement me&quot;)
  }
  
  // how should this look like?
  
  func NewMyDao() *Dao[ReturnType] {
      return &amp;MyDao[ReturnType]{}
  }
  </code></pre>
  <p>Is that even possible? I don't seem to be implementing the interface that way, and I've tried many combinations of the same.</p>
  <p>Is there a way to implement a generic interface? If not, is the alternative only to return the <code>interface{}</code> type?</p>