title: How do I declare a function pointer to a method in Go
body: <p>I am trying to create function pointer to a function that has a method receiver. However, I can't figure out how to get it to work (if it is possible)?</p>
  
  <p>Essentially, I have the following:</p>
  
  <pre><code>type Foo struct {...}
  func (T Foo) Bar bool {
     ... 
  }
  
  type BarFunc (Foo) func() bool // Does not work.
  </code></pre>
  
  <p>The last line of the code gives the error</p>
  
  <pre><code>syntax error: unexpected func, expecting semicolon or newline
  </code></pre>