title: impossible type switch case: cannot have dynamic type
body: <p>Have following struct:</p>
  
  <pre><code>package dto
  
  type CapacityResponse struct{
      Val int
      Err error
      TransactionID string
  }
  
  func (r *CapacityResponse) GetError() (error) {
      return r.Err
  }
  
  func (r *CapacityResponse) SetError(err error)  {
      r.Err = err
  }
  
  func (r *CapacityResponse) Read() interface{}  {
      return r.Val
  }
  
  func (r *CapacityResponse) GetTransactionId() string  {
      return r.TransactionID
  }
  </code></pre>
  
  <p>It's interface:</p>
  
  <pre><code>package dto
  
  type Responder interface {
      Read() (interface{})
      GetError() (error)
      SetError(error)
      GetTransactionId() (string)
  }
  </code></pre>
  
  <p>And following logic:</p>
  
  <pre><code>func handler(w http.ResponseWriter, r *http.Request) {
      cr := request2CacheRequest(r)
      responseChan := make(chan dto.Responder)
  
      go func() {
          responder := processReq(cr)
          responseChan &lt;- responder
      }()
  
      go func() {
          for r := range responseChan {
              if (r.GetTransactionId() == cr.TransactionID) {
                  switch r.(type) {
                  //case dto.KeysResponse:
                  //case dto.GetResponse:
                  //case dto.RemoveResponse:
                  //case dto.SetResponse:
                  case dto.CapacityResponse:
                      if i, ok := r.Read().(int); ok {
                          fmt.Fprintf(w, fmt.Sprintf("{'capasity': %d, 'err': %s}", i, r.GetError()))
                      }
  
                  }
              }
          }
      }()
  }
  </code></pre>
  
  <p>I am getting exception:</p>
  
  <pre><code>impossible type switch case: r (type dto.Responder) cannot have dynamic type dto.CapacityResponse (missing GetError method)
  </code></pre>
  
  <p>Could you, please, help me to understand what is wrong here?</p>