// New allocates new Composer and pre-allocates space for given amount of arguments and expressions.
// Each child expression passed to the constructor creates new child Composer
// with pre-allocated space for expressions.
428012
func New(args, nbOfExpressions int, nbOfExpressionsForEachChild ...int) *Composer {
	return neww(nil, args, nbOfExpressions, nbOfExpressionsForEachChild...)
}
232088
func New(options ...Options) *Render {
	var o Options
	if len(options) > 0 {
		o = options[0]
	}

	r := Render{
		opt: o,
	}

	r.prepareOptions()
	r.compileTemplates()

	return &r
}
964196
func New(store *store.MemoryStore, pg plugingetter.PluginGetter, netConfig *cnmallocator.NetworkConfig) (*Allocator, error) {
	a := &Allocator{
		store: store,
		taskBallot: &taskBallot{
			votes: make(map[string][]string),
		},
		stopChan:      make(chan struct{}),
		doneChan:      make(chan struct{}),
		pluginGetter:  pg,
		networkConfig: netConfig,
	}

	return a, nil
}
829613
func (c *Composer) Compose(nbOfChildExpressions ...int) (comp *Composer) {
	if len(c.childs) > c.composed {
		comp = c.childs[c.composed]

		if len(nbOfChildExpressions) != 0 {
			comp.childs = make([]*Composer, 0, len(nbOfChildExpressions))
			for i := range comp.childs {
				comp.childs[i] = neww(c, nbOfChildExpressions[i], nbOfChildExpressions[i])
			}
		}
		c.composed++
		return
	}

	comp = neww(c, 0, 0, nbOfChildExpressions...)
	c.childs = append(c.childs, comp)
	c.composed++
	return
}
651362
func New(deps *deps.Deps) (*Namespace, error) {
	if deps.ResourceSpec == nil {
		return &Namespace{}, nil
	}

	scssClient, err := scss.New(deps.BaseFs.Assets, deps.ResourceSpec)
	if err != nil {
		return nil, err
	}
	return &Namespace{
		deps:            deps,
		scssClient:      scssClient,
		createClient:    create.New(deps.ResourceSpec),
		bundlerClient:   bundler.New(deps.ResourceSpec),
		integrityClient: integrity.New(deps.ResourceSpec),
		minifyClient:    minifier.New(deps.ResourceSpec),
		postcssClient:   postcss.New(deps.ResourceSpec),
		templatesClient: templates.New(deps.ResourceSpec, deps.TextTmpl),
	}, nil
}
1281692
func New() *Writer {
	termWidth, _ = getTermSize()
	if termWidth != 0 {
		overFlowHandled = true
	}

	return &Writer{
		Out:             Out,
		RefreshInterval: RefreshInterval,

		mtx: &sync.Mutex{},
	}
}
1276832
func New() *RabinKarp64 {
	p, err := RandomPolynomial(1)
	if err != nil {
		panic(err)
	}
	return NewFromPol(p)
}
579685
func NewFields(p level.Priority, f Fields) Composer {
	m := MakeFields(f)
	_ = m.SetPriority(p)

	return m
}
932234
func New() *Compiler {
	compiler := new(Compiler)
	compiler.filename = ""
	compiler.tempvarIndex = 0
	compiler.PrettyPrint = true
	compiler.Options = DefaultOptions
	compiler.mixins = make(map[string]*parser.Mixin)

	return compiler
}
24423
func (factory *Factory) New(entries []string) (acl.ACL, error) {
	acl := SimpleACL(map[string]bool{})
	for _, e := range entries {
		acl[e] = true
	}
	return acl, nil
}
1153749
func New(w io.Writer, sep string, l int) io.Writer {
	return &writer{
		Sep: sep,
		Len: l,
		w: w,
	}
}
470698
func New(input string) (OSArch, error) {
	if parts := strings.Split(input, "-"); len(parts) == 2 && isAlphaNumericOnly(parts[0]) && isAlphaNumericOnly(parts[1]) {
		return OSArch{OS: parts[0], Arch: parts[1]}, nil
	}
	return OSArch{}, fmt.Errorf("not a valid OSArch value: %s", input)
}
1254482
func New(maxSize uint64) *Cache {
	return &Cache{
		cache:   make(map[string]element),
		maxSize: maxSize,
	}
}
593916
func New(na ...string) (log Logger) {
	s := strings.Join(na, DefaultSepperator)
	return Logger(s)
}
1160238
func New(hashsize int, conf *skein.Config) hash.Hash {
	s := new(hashFunc)
	s.initialize(hashsize, conf)
	return s
}
110348
func New(minSize, maxSize int) *Pool {
	if maxSize < minSize {
		panic("maxSize can't be less than minSize")
	}
	const multiplier = 2
	var pools []*sizedPool
	curSize := minSize
	for curSize < maxSize {
		pools = append(pools, newSizedPool(curSize))
		curSize *= multiplier
	}
	pools = append(pools, newSizedPool(maxSize))
	return &Pool{
		minSize: minSize,
		maxSize: maxSize,
		pools:   pools,
	}
}
822486
func New(basePath string) *Cache {
	return &Cache{
		d: diskv.New(diskv.Options{
			BasePath:     basePath,
			CacheSizeMax: 100 * 1024 * 1024, // 100MB
		}),
	}
}