// init will initialize the reader and set the input.
502706
func (b *byteReader) init(in []byte) {
	b.b = in
	b.off = 0
}
1286295
func (fs *FlagSet) Init(name string, errorHandling ErrorHandling) {
	fs.name = name
	fs.errorHandling = errorHandling
}
936745
func (rc *ReadCloser) init(r *tar.Reader) error {
	defer rc.Close()

	rc.File = make([]*tar.Header, 0, 10)
	for {
		h, err := r.Next()
		if err == io.EOF {
			break
		} else if err != nil {
			return err
		}

		rc.File = append(rc.File, h)
	}
	return nil
}
330189
func (strings *Strings) Init() error {
	if s := *strings; len(s) > 0 {
		*strings = s[:0]
	}
	return nil
}
1078155
func (d *decoder) init(in *bitReader, dt []decSymbol, tableLog uint8) {
	d.dt = dt
	d.br = in
	d.state = uint16(in.getBits(tableLog))
}
289600
func init() {
	buf, err := GetBytes(9)
	if err != nil {
		localID = [9]byte{'D', 'e', 'f', 'a', 'u', 'l', 't', 'I', 'D'}
	} else {
		_, err = io.ReadFull(bytes.NewBuffer(buf), localID[:])
		if err != nil {
			localID = [9]byte{'D', 'e', 'f', 'a', 'u', 'l', 't', 'I', 'D'}
		}
	}
}
936779
func (t *Trainer) Init() (err error) {
	f := func() {
		err = t.nn.init()
	}
	t.once.Do(f)
	return
}
1056252
func (w *MultiLevelSkipListWriter) init() {
	w.skipBuffer = make([]*RAMOutputStream, w.numberOfSkipLevels)
	for i, _ := range w.skipBuffer {
		w.skipBuffer[i] = NewRAMOutputStreamBuffer()
	}
}
1209586
func (ints *Ints) Init() error {
	if s := *ints; len(s) > 0 {
		*ints = s[:0]
	}
	return nil
}
1309605
func (p PhysicalTableScan) Init(ctx sessionctx.Context) *PhysicalTableScan {
	p.basePhysicalPlan = newBasePhysicalPlan(ctx, TypeTableScan, &p)
	return &p
}
277553
func (c *infoCommand) Init(args []string) (err error) {
	c.Username, err = cmd.ZeroOrOneArgs(args)
	return err
}
370772
func (d *TimeDecoder) Init(b []byte) {
	d.v = 0
	d.i = 0
	d.ts = d.ts[:0]
	d.err = nil
	if len(b) > 0 {
		// Encoding type is stored in the 4 high bits of the first byte
		d.encoding = b[0] >> 4
	}
	d.decode(b)
}
1352475
func init() {
	r, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt64))
	if err != nil {
		prand.Seed(time.Now().UnixNano())
	} else {
		prand.Seed(r.Int64())
	}
	globalNUID = &lockedNUID{NUID: New()}
	globalNUID.RandomizePrefix()
}
525775
func (c *Client) Init() error {
	stdin, err := ioutil.ReadAll(os.Stdin)
	if err != nil {
		return errors.Annotate(err, "failed to read stdin").Err()
	}

	c.InitBuild = &pb.Build{}
	if err := proto.Unmarshal(stdin, c.InitBuild); err != nil {
		return errors.Annotate(err, "failed to parse buildbucket.v2.Build from stdin").Err()
	}

	if c.Logdog, err = bootstrap.Get(); err != nil {
		return err
	}

	buildTimestamp := c.BuildTimestamp
	if buildTimestamp.IsZero() {
		buildTimestamp = time.Now()
	}

	c.buildStream, err = c.Logdog.Client.NewStream(streamproto.Flags{
		Name:        streamproto.StreamNameFlag(BuildStreamName),
		Type:        streamproto.StreamType(logpb.StreamType_DATAGRAM),
		ContentType: protoutil.BuildMediaType,
		Timestamp:   clockflag.Time(buildTimestamp),
	})
	return err
}
1153347
func (b *bufferManager) init(initialOffset, size, entrySize int) {
	b.freeList = nil
	b.curOffset = uint64(initialOffset)
	b.limit = uint64(initialOffset + size/entrySize*entrySize)
	b.entrySize = uint32(entrySize)
}
236571
func Init(c *config.Config) (*Service, error) {
	return &Service{Config: c}, nil
}
800873
func (o *lazyObject) init() error {
	o.lock.Lock()
	defer o.lock.Unlock()
	if o.loaded {
		return o.err
	}
	o.mapper, o.err = o.loader()
	o.loaded = true
	return o.err
}