code: func bufCreate(name string) *bufWriter {
  	var (
  		f   *os.File
  		err error
  	)
  	if name != "" {
  		f, err = os.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
  	} else {
  		f, err = ioutil.TempFile("", "csearch")
  	}
  	if err != nil {
  		log.Fatal(err)
  	}
  	return &bufWriter{
  		name: f.Name(),
  		buf:  make([]byte, 0, 256<<10),
  		file: f,
  	}
  }
docs: // bufCreate creates a new file with the given name and returns a
  // corresponding bufWriter.  If name is empty, bufCreate uses a
  // temporary file.