// NewCopier creates a new Copier
432594
func NewCopier(srcs map[string]io.Reader, dst Logger) *Copier {
	return &Copier{
		srcs:   srcs,
		dst:    dst,
		closed: make(chan struct{}),
	}
}
1304917
func (p *statsdProvider) NewCounter(name string) metrics.Counter {
	return p.s.NewCounter(name, 1.0)
}
1144862
func NewEncoder(w io.Writer, options ...EncoderOption) *Encoder {
	e := &Encoder{w: w}
	for _, o := range options {
		o(e)
	}
	return e
}
306754
func NewFileMigrator(path string, c *Connection) (FileMigrator, error) {
	fm := FileMigrator{
		Migrator: NewMigrator(c),
		Path:     path,
	}
	fm.SchemaPath = path

	err := fm.findMigrations()
	if err != nil {
		return fm, errors.WithStack(err)
	}

	return fm, nil
}
1161277
func New() *Logger {
	return &Logger{
		Level:      InfoLevel,
		TimeFormat: "2006/01/02 15:04",
		NewLine:    true,
		Printer:    pio.NewPrinter("", os.Stdout).EnableDirectOutput().Hijack(logHijacker),
		children:   newLoggerMap(),
	}
}
472623
func NewUploader(ctx context.Context, client *isolatedclient.Client, maxConcurrent int) *ConcurrentUploader {
	return newUploader(ctx, client, maxConcurrent)
}
1226846
func NewReader(r io.Reader) (io.Reader, error) {
	d, err := newDecoder(r)
	if err != nil {
		return nil, err
	}
	offset := int64(d.features[tStripOffsets][0])
	n := int64(d.features[tStripByteCounts][0])
	switch d.firstVal(tCompression) {
	case cJPEG, cJPEGOld:
	default:
		return nil, UnsupportedError("compression")
	}

	return io.NewSectionReader(d.r, offset, n), nil
}
1113689
func NewVersionedColumnPrinter(printer ColumnPrinter, convertor runtime.ObjectConvertor, version runtime.GroupVersioner) ColumnPrinter {
	return &VersionedColumnPrinter{
		printer:   printer,
		convertor: convertor,
		version:   version,
	}
}
38128
func (c *DefaultClient) NewPublisher(exchange string) Publisher {
	return &DefaultPublisher{
		DefaultChannelClient: DefaultChannelClient{
			ctx:      c.ctx,
			client:   c,
			exchange: exchange,
			name:     "Publisher",
		},
	}
}
1213421
func NewDecoder(r io.Reader) *Decoder {
	return &Decoder{Decoder: *json.NewDecoder(r)}
}
206281
func NewEncoder(w io.Writer) goa.Encoder {
	return &ProtoEncoder{
		pBuf: proto.NewBuffer(nil),
		w:    w,
	}
}
505452
func NewConverter() *Converter {
	c := &Converter{
		conversionFuncs:          map[typePair]reflect.Value{},
		generatedConversionFuncs: map[typePair]reflect.Value{},
		defaultingFuncs:          map[reflect.Type]reflect.Value{},
		defaultingInterfaces:     map[reflect.Type]interface{}{},
		nameFunc:                 func(t reflect.Type) string { return t.Name() },
		structFieldDests:         map[typeNamePair][]typeNamePair{},
		structFieldSources:       map[typeNamePair][]typeNamePair{},

		inputFieldMappingFuncs: map[reflect.Type]FieldMappingFunc{},
		inputDefaultFlags:      map[reflect.Type]FieldMatchingFlags{},
	}
	c.RegisterConversionFunc(ByteSliceCopy)
	return c
}
1100482
func NewLogger(writer io.Writer, name string) Logger {
	formatter, err := createFormatter(name, logxiFormat)
	if err != nil {
		panic("Could not create formatter")
	}
	return NewLogger3(writer, name, formatter)
}
138644
func NewPinger(base *mgo.Collection, modelTag names.ModelTag, key string, recorderFunc func() PingRecorder) *Pinger {
	return &Pinger{
		base:         base,
		pings:        pingsC(base),
		beingKey:     key,
		modelUUID:    modelTag.Id(),
		recorderFunc: recorderFunc,
	}
}
918797
func NewDecoder(rd io.Reader) Decoder {
	dec := gob.NewDecoder(rd)
	return func(r *Result) error { return dec.Decode(r) }
}
761021
func NewDecoder(r io.Reader) *Decoder {
	decoder := new(Decoder)
	decoder.pendingTag = -1
	decoder.syms = make([]string, 0)
	decoder.in = bufio.NewReader(r)
	//	decoder.currentCursor = nil
	decoder.readHeader()
	return decoder
}
1036589
func NewPrettyPrinter(w io.Writer, indentStr string) *PrettyPrinter {
	return &PrettyPrinter{
		w:           w,
		indentStr:   indentStr,
		indentDepth: 0,
	}
}