// NewWriter create GCS Object Writer.
976525
func (g *GcsFS) NewWriter(o string, metadata map[string]string) (io.WriteCloser, error) {
	return g.NewWriterWithContext(context.Background(), o, metadata)
}
1192304
func NewIndentWriter(w io.Writer, pre ...[]byte) io.Writer {
	return &indentWriter{
		w:   w,
		pre: pre,
		bol: true,
	}
}
1089930
func NewWriter(w io.Writer) *Writer {
	z, _ := NewWriterLevelDict(w, DefaultCompression, nil)
	return z
}
645379
func NewWriter(f db.File, o *db.Options) *Writer {
	w := &Writer{
		closer:               f,
		blockRestartInterval: o.GetBlockRestartInterval(),
		blockSize:            o.GetBlockSize(),
		cmp:                  o.GetComparer(),
		compression:          o.GetCompression(),
		filter: filterWriter{
			policy: o.GetFilterPolicy(),
		},
		prevKey:  make([]byte, 0, 256),
		restarts: make([]uint32, 0, 256),
	}
	if f == nil {
		w.err = errors.New("leveldb/table: nil file")
		return w
	}
	// If f does not have a Flush method, do our own buffering.
	type flusher interface {
		Flush() error
	}
	if _, ok := f.(flusher); ok {
		w.writer = f
	} else {
		w.bufWriter = bufio.NewWriter(f)
		w.writer = w.bufWriter
	}
	return w
}
21272
func NewWriter(w io.Writer) *Writer {
	if wr, ok := w.(*Writer); ok {
		return wr
	}
	return &Writer{
		w:   w,
		buf: make([]byte, 0, DefaultWriterSize),
	}
}
640856
func NewByteWriter(buf []byte) (w *ByteWriter) {
	w = new(ByteWriter)
	w.buf = buf
	return w
}
702603
func NewWriter(fp sophie.FsPath) (*Writer, error) {
	writer, err := fp.Fs.Create(fp.Path)
	if err != nil {
		return nil, errorsp.WithStacks(err)
	}

	return &Writer{
		writer: writer,
	}, nil
}
312469
func NewWriter(w io.Writer) *Writer {
	return &Writer{
		w:         multipart.NewWriter(w),
		firstPart: false,
		rootPart:  false,
	}
}
977574
func NewWriter(w io.Writer, h *Header, flags int) (*Writer, error) {
	if flags < FlagDecimal || flags > FlagString {
		return nil, errors.New("bam: flag format option out of range")
	}
	sw := &Writer{w: w, flags: flags}
	text, _ := h.MarshalText()
	_, err := w.Write(text)
	if err != nil {
		return nil, err
	}
	return sw, nil
}
1291996
func NewWriter(f io.ReadWriteSeeker, opts ...Option) *Writer {
	w := &Writer{
		f:           f,
		bw:          bufio.NewWriterSize(f, 65536*8),
		maxDiskSize: defaultMaxDiskSize,
	}
	for _, opt := range opts {
		opt(w)
	}
	return w
}
24890
func NewConsoleWithWriter(opts string, stdout, stderr io.Writer) logger.Provider {
	config := NewConsoleOpts()
	logger.UnmarshalOpts(opts, &config)
	return &Console{
		config: config,
		stdout: stdout,
		stderr: stderr,
	}
}
525614
func NewWriter(wr io.Writer) *Writer {
	mw := new(Writer)
	mw.Reset(wr)
	return mw
}
1124640
func NewWriter(w io.Writer) WriteCloser {
	return &writer{W: w, lock: new(sync.Mutex)}
}
570567
func NewWriterLoader(source io.Writer) (JSONLoader, io.Writer) {
	buf := &bytes.Buffer{}
	return &jsonIOLoader{buf: buf}, io.MultiWriter(source, buf)
}
1013953
func (w *bufferedWriter) createNewWriter(file *os.File) io.Writer {
	w.buf = bufio.NewWriterSize(file, w.bufSize)
	return w.buf
}
15580
func NewWriter(output io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) *Writer {
	return new(Writer).Init(output, minwidth, tabwidth, padding, padchar, flags)
}
969560
func NewWriterPool(min, max int) *WriterPool {
	return &WriterPool{pool.New(min, max)}
}