// New returns a new Box with the name of the box
// and the path of the box.
324587
func New(name string, path string) *Box {
	plog.Debug("packr", "New", "name", name, "path", path)
	b, _ := findBox(name)
	if b != nil {
		return b
	}

	b = construct(name, path)
	plog.Debug(b, "New", "Box", b, "ResolutionDir", b.ResolutionDir)
	b, err := placeBox(b)
	if err != nil {
		panic(err)
	}

	return b
}
230239
func (factory *NagiosBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := NagiosBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.services = make(map[string]map[string]service)
	bee.ReloadOptions(options)

	return &bee
}
140630
func New(transport peer.Transport, opts ...newrr.ListOption) *newrr.List {
	return newrr.New(transport, opts...)
}
261341
func (api *ProxyLBAPI) New(name string) *sacloud.ProxyLB {
	return sacloud.CreateNewProxyLB(name)
}
274067
func New() *T {
	return &T{
		new:    make(map[string]int64),
		active: make(map[string]int64),
		idle:   make(map[string]int64),
	}
}
622866
func New(message string, field string, kind Kind) Error {
	return Error{message, field, 0, kind}
}
197556
func (factory *SimplepushBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := SimplepushBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
903141
func (factory *JabberBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := JabberBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
71212
func New(ctx context.Context, path string) *Builder {
	return &Builder{
		Context:        ctx,
		RootPath:       path,
		IgnoredBoxes:   []string{},
		IgnoredFolders: []string{"vendor", ".git", "node_modules", ".idea"},
		pkgs:           map[string]pkg{},
		moot:           &sync.Mutex{},
	}
}
1126434
func (opt Options) New(c context.Context) output.Output {
	o := dirOutput{
		Context: c,
		Options: &opt,
		streams: map[types.StreamPath]*stream{},
	}
	return &o
}
921693
func New(dir, name string, args ...string) Command {
	c := Command{
		cmd: exec.Command(name, args...),
	}
	c.cmd.Dir = dir
	return c
}
1372246
func (factory *S3BeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := S3Bee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
1075359
func (factory *SpaceAPIBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := SpaceAPIBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
410521
func (i *identifier) new() string {
	i.m.Lock()
	defer i.m.Unlock()
	i.i++
	return strconv.Itoa(i.i)
}
206
func New(id manifold.ID) (string, string) {
	idBytes := id[2:]

	offset := 0
	adj, offset := fetchWord(idBytes, data.Adjectives, offset, aShare)
	color, offset := fetchWord(idBytes, data.Colors, offset, cShare)
	shape, _ := fetchWord(idBytes, data.Shapes, offset, sShare)

	name := strings.Title(adj + " " + color + " " + shape)
	label := strings.Replace(strings.ToLower(name), " ", "-", -1)
	return name, label
}
1310006
func NewBox() *Box {
	b := &Box{
		width:           15,
		height:          10,
		innerX:          -1, // Mark as uninitialized.
		backgroundColor: Styles.PrimitiveBackgroundColor,
		borderColor:     Styles.BorderColor,
		titleColor:      Styles.TitleColor,
		titleAlign:      AlignCenter,
	}
	b.focus = b
	return b
}
1302736
func New(
	ctx context.Context,
	host, user, pass, group string,
	opts *ClientOptions) (Client, error) {

	if host == "" || user == "" || pass == "" {
		return nil, errNewClient
	}

	c := &client{
		host: host,
		user: user,
		grup: group,
		auth: fmtAuthHeaderVal(user, pass),
		volp: defaultVolumesPath,
	}

	c.http = &http.Client{}

	if opts != nil {
		if opts.VolumesPath != "" {
			c.volp = opts.VolumesPath
		}

		if opts.Timeout != 0 {
			c.http.Timeout = opts.Timeout
		}

		if opts.Insecure {
			c.http.Transport = &http.Transport{
				TLSClientConfig: &tls.Config{
					InsecureSkipVerify: true,
				},
			}
		}
	}

	resp := &apiVerResponse{}
	if err := c.Get(ctx, "/platform/latest", "", nil, nil, resp); err != nil &&
		!strings.HasPrefix(err.Error(), "json: ") {
		return nil, err
	}

	if resp.Latest != nil {
		i, err := strconv.ParseUint(*resp.Latest, 10, 8)
		if err != nil {
			return nil, err
		}
		c.apiv = uint8(i)
	} else {
		c.apiv = 2
	}

	return c, nil
}