title: "<type> is pointer to interface, not interface" confusion
body: <p>I have this problem which seems a bit weird to me. Take a look at this snippet of code:</p>
  <pre><code>package coreinterfaces
  
  type FilterInterface interface {
      Filter(s *string) bool
  }
  
  type FieldFilter struct {
      Key string
      Val string
  }
  
  func (ff *FieldFilter) Filter(s *string) bool {
      // Some code
  }
  
  type FilterMapInterface interface {
      AddFilter(f *FilterInterface) uuid.UUID     
      RemoveFilter(i uuid.UUID)                   
      GetFilterByID(i uuid.UUID) *FilterInterface
  }
  
  type FilterMap struct {
      mutex   sync.Mutex
      Filters map[uuid.UUID]FilterInterface
  }
  
  func (fp *FilterMap) AddFilter(f *FilterInterface) uuid.UUID {
      // Some code
  }
  
  func (fp *FilterMap) RemoveFilter(i uuid.UUID) {
      // Some code
  }
  
  func (fp *FilterMap) GetFilterByID(i uuid.UUID) *FilterInterface {
      // Some code
  }
  </code></pre>
  <p>On some other package, I have the following code:</p>
  <pre><code>func DoFilter() {
      fieldfilter := &amp;coreinterfaces.FieldFilter{Key: &quot;app&quot;, Val: &quot;152511&quot;}
      filtermap := &amp;coreinterfaces.FilterMap{}
      _ = filtermap.AddFilter(fieldfilter) // &lt;--- Exception is raised here
  }
  </code></pre>
  <p>The run-time won't accept the line mentioned because</p>
  <blockquote>
  <p>&quot;cannot use fieldfilter (type *coreinterfaces.FieldFilter) as type
  *coreinterfaces.FilterInterface in argument to fieldint.AddFilter:
  *coreinterfaces.FilterInterface is pointer to interface, not interface&quot;</p>
  </blockquote>
  <p>However, when changing the code to:</p>
  <pre><code>func DoBid() error {
      bs := string(b)
      var ifilterfield coreinterfaces.FilterInterface
      fieldfilter := &amp;coreinterfaces.FieldFilter{Key: &quot;app&quot;, Val: &quot;152511&quot;}
      ifilterfield = fieldfilter
      filtermap := &amp;coreinterfaces.FilterMap{}
      _ = filtermap.AddFilter(&amp;ifilterfield)
  }
  </code></pre>
  <p>Everything is alright and when debugging the application it really seems to include</p>
  <p>I'm a bit confused on this topic. When looking at other blog posts and stack overflow threads discussing this exact same issue (for example - <a href="https://www.goinggo.net/2014/05/methods-interfaces-and-embedded-types.html" rel="noreferrer">This</a>, or
  <a href="https://stackoverflow.com/questions/40823315/go-x-does-not-implement-y-method-has-a-pointer-receiver">This</a>) the first snippet which raises this exception should work, because both fieldfilter and fieldmap are initialized as pointers to interfaces, rather than value of interfaces. I haven't been able to wrap my head around what actually happens here that I need to change in order for me not to declare a FieldInterface and assign the implementation for that interface. There must be an elegant way to do this.</p>