code: func (w *Writer) Close() error {
  	if err := w.sampleBuf.Flush(); err != nil {
  		return err
  	}
  
  	_, err := w.Seek(0, os.SEEK_SET)
  	if err != nil {
  		return err
  	}
  
  	header := riffHeader{
  		ChunkSize: uint32(w.bytesWritten + 8),
  	}
  	copy(header.Ftype[:], tokenRiff[:])
  	copy(header.ChunkFormat[:], tokenWaveFormat[:])
  
  	err = binary.Write(w.output, binary.LittleEndian, header)
  	if err != nil {
  		return err
  	}
  
  	// write data chunk size
  	_, err = w.Seek(0x28, os.SEEK_SET)
  	if err != nil {
  		return err
  	}
  
  	// write chunk size
  	err = binary.Write(w.output, binary.LittleEndian, int32(w.bytesWritten))
  	if err != nil {
  		return err
  	}
  
  	return w.output.Close()
  }
docs: // Close corrects the filesize information in the header