// newDator creates a new Dator and immediately begins reading lines from the included lipsum.txt file.
191619
func newDator(name string) manidator.Dator {
	d := manidator.NewDator(name)

	go randReader(d)

	return d
}
550441
func NewReader(in io.Reader) (*Reader, error) {
	r := new(Reader)
	r.r.source = in
	r.r.seeker, _ = in.(io.Seeker)
	if err := r.init(); err != nil {
		return nil, err
	}
	return r, nil
}
773062
func NewDecoder(reader io.Reader) *Decoder {
	return &Decoder{
		reader: bufio.NewReader(reader),
	}
}
800059
func NewReader(logFile io.Reader, format string) *Reader {
	return NewParserReader(logFile, NewParser(format))
}
660159
func New(rawData ...interface{}) *Notifier {
	config := Config.clone()
	for i, datum := range rawData {
		if c, ok := datum.(Configuration); ok {
			config.update(&c)
			rawData[i] = nil
		}
	}

	return &Notifier{
		Config:  config,
		RawData: rawData,
	}
}
953510
func NewReader(base string) *Reader {
	stats, _ := os.Stat(base)
	if stats != nil {
		if stats.IsDir() {
			return NewDirReader(base)
		}
		return NewYAMLReader(base)
	}
	return NewEnvReader()
}
1367906
func NewDecoder(enc *Encoding, r io.Reader) io.Reader {
	return &decoder{enc: enc, r: r}
}
593976
func NewReader(charset string, r io.Reader) (io.Reader, error) {
	tr, err := TranslatorFrom(charset)
	if err != nil {
		return nil, err
	}
	return NewTranslatingReader(r, tr), nil
}
968514
func NewReader(i io.Reader) (o io.Reader, err error) {
	// Create reader
	r := bufio.NewReader(i)

	// Read first 4 bytes
	var b []byte
	if b, err = r.Peek(4); err != nil {
		err = errors.Wrap(err, "astiunicode: reading first 4 bytes failed")
		return
	}

	// Create transformer
	if bytes.HasPrefix(b, bomHeaderUTF32BE) || bytes.HasPrefix(b, bomHeaderUTF32LE) {
		err = errors.New("astiunicode: UTF32 is not handled yet")
		return
	} else if bytes.HasPrefix(b, bomHeaderUTF16BE) {
		o = transform.NewReader(r, unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM).NewDecoder())
	} else if bytes.HasPrefix(b, bomHeaderUTF16LE) {
		o = transform.NewReader(r, unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM).NewDecoder())
	} else if bytes.HasPrefix(b, bomHeaderUTF8) {
		o = transform.NewReader(r, unicode.UTF8.NewDecoder())
	} else {
		o = r
	}
	return
}
331465
func NewReader(src io.Reader, buf Buffer) io.ReadCloser {
	r, w := Pipe(buf)

	go func() {
		_, err := io.Copy(w, src)
		w.CloseWithError(err)
	}()

	return r
}
380558
func New(dataDir string) (*Migrator, error) {
	// Check that the directory exists
	if _, err := os.Stat(dataDir); err != nil {
		return nil, err
	}

	// Create the struct
	m := &Migrator{
		ProgressCh: make(chan *ProgressUpdate, 128),
		dataDir:    dataDir,

		raftPath:      filepath.Join(dataDir, raftDir),
		mdbPath:       filepath.Join(dataDir, raftDir, mdbDir),
		mdbBackupPath: filepath.Join(dataDir, raftDir, mdbBackupDir),
		boltPath:      filepath.Join(dataDir, raftDir, boltFile),
		boltTempPath:  filepath.Join(dataDir, raftDir, boltTempFile),
	}

	return m, nil
}
285577
func NewReader(r io.Reader, bo binary.ByteOrder) Reader {
	return &reader{
		r:  r,
		bo: bo,
	}
}
659920
func NewDecoder(r io.Reader, format Format) Decoder {
	switch format {
	case FmtProtoDelim:
		return &protoDecoder{r: r}
	}
	return &textDecoder{r: r}
}
1015646
func NewReader(ctx context.Context, r io.Reader) *Reader {
	return &Reader{
		ctx:    ctx,
		reader: r,
	}
}
847681
func NewDir(inode uint64, provider FileContentProvider) *Dir {
	return &Dir{
		inode:    inode,
		nodes:    map[string]fs.Node{},
		provider: provider,
	}
}
484247
func NewDecoder(r io.Reader) Decoder {
	return Decoder{
		r:   r,
		buf: &bytes.Buffer{},
	}
}
825953
func NewDecoder(r io.Reader) *Decoder {
	dec := &Decoder{
		s: bufio.NewScanner(r),
	}
	return dec
}