code: func (cdb *Writer) Close() error {
  	var err error
  	cdb.finalizeOnce.Do(func() {
  		_, err = cdb.finalize()
  	})
  
  	if err != nil {
  		return err
  	}
  
  	if closer, ok := cdb.writer.(io.Closer); ok {
  		return closer.Close()
  	} else {
  		return nil
  	}
  }
docs: // Close finalizes the database, then closes it to further writes.
  //
  // Close or Freeze must be called to finalize the database, or the resulting
  // file will be invalid.