code: func (w *GatedWriter) Flush() {
  	w.lock.Lock()
  	w.flush = true
  	w.lock.Unlock()
  
  	for _, p := range w.buf {
  		w.Write(p)
  	}
  	w.buf = nil
  }
docs: // Flush tells the GatedWriter to flush any buffered data and to stop
  // buffering.