// MakeDatums creates datum slice from interfaces.
435476
func MakeDatums(args ...interface{}) []Datum {
	datums := make([]Datum, len(args))
	for i, v := range args {
		datums[i] = NewDatum(v)
	}
	return datums
}
44100
func makeRootMetadata(bareMd kbfsmd.MutableRootMetadata,
	extra kbfsmd.ExtraMetadata, handle *tlfhandle.Handle) *RootMetadata {
	if bareMd == nil {
		panic("nil kbfsmd.MutableRootMetadata")
	}
	// extra can be nil.
	if handle == nil {
		panic("nil handle")
	}
	return &RootMetadata{
		bareMd:    bareMd,
		extra:     extra,
		tlfHandle: handle,
	}
}
467404
func (mr MutRow) SetDatums(datums ...types.Datum) {
	for i, d := range datums {
		mr.SetDatum(i, d)
	}
}
997978
func MakeTable(params Params) *Table {
	table := new(Table)
	table.params = params
	for n := 0; n < 256; n++ {
		crc := uint16(n) << 8
		for i := 0; i < 8; i++ {
			bit := (crc & 0x8000) != 0
			crc <<= 1
			if bit {
				crc ^= params.Poly
			}
		}
		table.data[n] = crc
	}
	return table
}
150192
func MakeVM() *VM {
	return &VM{
		MaxStack:       500,
		ext:            make(vmExtMap),
		tla:            make(vmExtMap),
		nativeFuncs:    make(map[string]*NativeFunction),
		ErrorFormatter: &termErrorFormatter{pretty: false, maxStackTraceSize: 20},
		importer:       &FileImporter{},
	}
}
1332741
func (w *WithDimensions) Datapoints() []*datapoint.Datapoint {
	return w.appendDimensions(w.Collector.Datapoints())
}
1026705
func MakeTable(headers []string) Table {
	t := MakeHeadlessTable(len(headers))
	for i := range t.columns {
		t.columns[i].title = headers[i]
		t.columns[i].width = len(headers[i])
	}
	return t
}
861739
func makeQuery(t, q string, a map[string]interface{}) map[string]interface{} {
	return map[string]interface{}{
		"t": t,
		"y": "q",
		"q": q,
		"a": a,
	}
}
753823
func (m *Mercury) MakeDeployStatus(ctx context.Context, opts *types.DeployOptions, nodesInfo []types.NodeInfo) ([]types.NodeInfo, error) {
	// 手动加 / 防止不精确
	key := filepath.Join(containerDeployPrefix, opts.Name, opts.Entrypoint.Name) + "/"
	resp, err := m.Get(ctx, key, clientv3.WithPrefix(), clientv3.WithKeysOnly())
	if err != nil {
		return nil, err
	}
	if resp.Count != 0 {
		nodesInfo, err = m.doGetDeployStatus(ctx, resp, nodesInfo)
		if err != nil {
			return nil, err
		}
	} else {
		log.Warnf("[MakeDeployStatus] Deploy status not found %s.%s", opts.Name, opts.Entrypoint.Name)
	}
	return m.doLoadProcessing(ctx, opts, nodesInfo)
}
1146751
func makeStoredLabels(labels []string) map[string]string {
	storedLabels := make(map[string]string)
	for _, s := range labels {
		split := strings.SplitN(s, "=", 2)
		if len(split) == 1 {
			storedLabels[split[0]] = split[0]
		} else {
			storedLabels[split[1]] = split[0]
		}
	}
	return storedLabels
}
379838
func DatumsToInterfaces(datums []Datum) []interface{} {
	ins := make([]interface{}, len(datums))
	for i, v := range datums {
		ins[i] = v.GetValue()
	}
	return ins
}
412419
func (p *PopOp) makeTombstonesEntity() *tombstonesEntity {
	p.entity.Tombstones = p.entity.Tombstones[:0]
	for id, ts := range p.tombs {
		p.entity.Tombstones = append(p.entity.Tombstones, struct {
			ID         string
			Tombstoned time.Time
		}{id, ts})
	}
	return p.entity
}
641327
func (_m *Store) MakeDeployStatus(ctx context.Context, opts *types.DeployOptions, nodesInfo []types.NodeInfo) ([]types.NodeInfo, error) {
	ret := _m.Called(ctx, opts, nodesInfo)

	var r0 []types.NodeInfo
	if rf, ok := ret.Get(0).(func(context.Context, *types.DeployOptions, []types.NodeInfo) []types.NodeInfo); ok {
		r0 = rf(ctx, opts, nodesInfo)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]types.NodeInfo)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *types.DeployOptions, []types.NodeInfo) error); ok {
		r1 = rf(ctx, opts, nodesInfo)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
206350
func makeDatabaseHandles() int {
	limit, err := fdlimit.Maximum()
	if err != nil {
		Fatalf("Failed to retrieve file descriptor allowance: %v", err)
	}
	raised, err := fdlimit.Raise(uint64(limit))
	if err != nil {
		Fatalf("Failed to raise file descriptor allowance: %v", err)
	}
	return int(raised / 2) // Leave half for networking and other stuff
}
1081566
func (pts BittrexDepthArray) makePts() []DepthPoint {
	depth := make([]DepthPoint, 0, len(pts))
	for _, pt := range pts {
		depth = append(depth, DepthPoint{
			Quantity: pt.Quantity,
			Price:    pt.Rate,
		})
	}
	return depth
}
1030137
func SortDatums(sc *variable.StatementContext, datums []Datum) error {
	sorter := datumsSorter{datums: datums, sc: sc}
	sort.Sort(&sorter)
	return sorter.err
}
921726
func (m *Manager) AddDataSource(data []byte, ct string) {
	src := &dataSource{
		Data: data,
		Type: ct,
	}
	m.AddSource(src)
}