func (w *Writer) MustClose() {
	if err := w.bw.Flush(); err != nil {
		logger.Panicf("FATAL: cannot flush data to file %q: %s", w.f.Name(), err)
	}
	putBufioWriter(w.bw)
	w.bw = nil

	if err := w.f.Sync(); err != nil {
		logger.Panicf("FATAL: cannot sync file %q: %d", w.f.Name(), err)
	}
	if err := w.st.close(); err != nil {
		logger.Panicf("FATAL: cannot close streamTracker for file %q: %s", w.f.Name(), err)
	}
	if err := w.f.Close(); err != nil {
		logger.Panicf("FATAL: cannot close file %q: %s", w.f.Name(), err)
	}
	w.f = nil

	writersCount.Dec()
}
// MustClose syncs the underlying file to storage and then closes it.
MustClose syncs the underlying file to storage and then closes it.
// MustClose syncs the underlying file to storage and then closes it .
func (w *Writer) MustClose() {
	if err := w.bw.Flush(); err != nil {
		logger.Panicf("FATAL: cannot flush data to file %q: %s", w.f.Name(), err)
	}
	putBufioWriter(w.bw)
	w.bw = nil
	if err := w.f.Sync(); err != nil {
		logger.Panicf("FATAL: cannot sync file %q: %d", w.f.Name(), err)
	}
	if err := w.st.close(); err != nil {
		logger.Panicf("FATAL: cannot close streamTracker for file %q: %s", w.f.Name(), err)
	}
	if err := w.f.Close(); err != nil {
		logger.Panicf("FATAL: cannot close file %q: %s", w.f.Name(), err)
	}
	w.f = nil
	writersCount.Dec()
}
func ( w * Writer ) MustClose ( ) { if err := w . bw . Flush ( ) ; err != nil { logger . Panicf ( " " , w . f . Name ( ) , err ) } putBufioWriter ( w . bw ) w . bw = nil if err := w . f . Sync ( ) ; err != nil { logger . Panicf ( " " , w . f . Name ( ) , err ) } if err := w . st . close ( ) ; err != nil { logger . Panicf ( " " , w . f . Name ( ) , err ) } if err := w . f . Close ( ) ; err != nil { logger . Panicf ( " " , w . f . Name ( ) , err ) } w . f = nil writersCount . Dec ( ) }
MustClose syncs the underlying file to storage and then closes it.
MustClose syncs the underlying file to storage and then closes it .