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
	}
}
// 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.
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.
// 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 .
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
	}
}
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 } }
Close finalizes the database, then closes it to further writes.
Close finalizes the database then closes it to further writes .