title: Getting "bytes.Buffer does not implement io.Writer" error message
body: <p>I'm trying to have some Go object implement io.Writer, but writes to a string instead of a file or file-like object. I thought <code>bytes.Buffer</code> would work since it implements <code>Write(p []byte)</code>. However when I try this:</p>
  
  <pre><code>import "bufio"
  import "bytes"
  
  func main() {
      var b bytes.Buffer
      foo := bufio.NewWriter(b)
  }
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>cannot use b (type bytes.Buffer) as type io.Writer in function argument:
  bytes.Buffer does not implement io.Writer (Write method has pointer receiver)
  </code></pre>
  
  <p>I am confused, since it clearly implements the interface. How do I resolve this error?</p>