// New returns an environment initialized with the defaults.
351602
func New() *Environment {
	e := engine.New()
	var ey EngineYard = map[string]Engine{
		// Currently, the only template engine we support is the GoTpl one. But
		// we can easily add some here.
		GoTplEngine: e,
	}

	return &Environment{
		EngineYard: ey,
		Releases:   storage.Init(driver.NewMemory()),
	}
}
727478
func New(c Config) (*Logging, error) {
	encoderConfig := zap.NewProductionEncoderConfig()
	encoderConfig.NameKey = "name"

	s := &Logging{
		LoggerLevels: &LoggerLevels{
			defaultLevel: defaultLevel,
		},
		encoderConfig:  encoderConfig,
		multiFormatter: fabenc.NewMultiFormatter(),
	}

	err := s.Apply(c)
	if err != nil {
		return nil, err
	}
	return s, nil
}
1124385
func New(parsedConfig *Config, manager *plugins.Manager) *Plugin {
	p := &Plugin{
		manager: manager,
		config:  *parsedConfig,
		status: &Status{
			Name: parsedConfig.Name,
		},
	}
	p.initDownloader()
	return p
}
206319
func New(exec utilexec.Interface, dbus utildbus.Interface, protocol Protocol) Interface {
	return newInternal(exec, dbus, protocol, "")
}
1187229
func New(dispatcher Dispatcher, opts ...options.Opt) *Service {
	params := defaultParams()
	options.Apply(params, opts)

	return &Service{
		params:     *params,
		dispatcher: dispatcher,
	}
}
556623
func New() (*Config, error) {
	c := &Config{}
	err := envconfig.Process("collectorset-controller", c)
	if err != nil {
		return nil, err
	}

	return c, nil
}
923638
func New(projectId int64, key string, environment string) *AirbrakeHandler {
	repoRoot, _, repoVersion := util.RepoInfo()
	context := &AirbrakeContext{
		OS:            runtime.GOOS + " " + runtime.GOARCH, //TODO syscall.Uname() when in linux
		Language:      "go " + runtime.Version(),
		Environment:   environment,
		RootDirectory: repoRoot,
		Version:       repoVersion,
	}

	env := map[string]string{}
	env["_"] = os.Args[0]
	env["GOVERSION"] = runtime.Version()
	env["GOMAXPROCS"] = fmt.Sprintf("%d", runtime.GOMAXPROCS(0))
	env["GOROOT"] = runtime.GOROOT()
	env["HOSTNAME"], _ = os.Hostname()

	aURL, _ := url.Parse(fmt.Sprintf("%s/api/v3/projects/%d/notices?key=%s", airbrakeURL, projectId, key))
	return &AirbrakeHandler{
		AirbrakeURL: aURL,
		projectId:   projectId,
		key:         key,
		Context:     context,
		Env:         env,
	}
}
604311
func New(configFilePath string) (*Registry, error) {
	c := Registry{
		v: viper.New(),
	}
	c.v.SetEnvPrefix("F8")
	c.v.AutomaticEnv()
	c.v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
	c.v.SetTypeByDefaultValue(true)
	c.setConfigDefaults()

	if configFilePath != "" {
		c.v.SetConfigType("yaml")
		c.v.SetConfigFile(configFilePath)
		err := c.v.ReadInConfig() // Find and read the config file
		if err != nil {           // Handle errors reading the config file
			return nil, errs.Errorf("Fatal error config file: %s \n", err)
		}
	}
	return &c, nil
}
548477
func New(client RedisClient, key string, opts *Options) *Locker {
	var o Options
	if opts != nil {
		o = *opts
	}
	o.normalize()

	return &Locker{client: client, key: key, opts: o}
}
995777
func (e *EnvironmentService) Create(environment *Environment) (data *EnvironmentResult, err error) {
	body, err := JSONReader(environment)
	if err != nil {
		return
	}

	err = e.client.magicRequestDecoder("POST", "environments", body, &data)
	return
}
987906
func New(options ...Option) (*INI, error) {
	ini := &INI{}
	for _, option := range options {
		if err := option(ini); err != nil {
			return nil, err
		}
	}

	if len(ini.comment) == 0 {
		ini.comment = []byte(DefaultComment)
	}
	if ini.sliceSep == 0 {
		ini.sliceSep = DefaultSliceSeparator
	}
	if ini.mapkeySep == 0 {
		ini.mapkeySep = DefaultMapKeySeparator
	}

	return ini, nil
}
572669
func New(cfg ...Config) *Typescript {
	c := DefaultConfig()
	if len(cfg) > 0 {
		c = cfg[0]
	}

	return &Typescript{Config: &c}
}
113572
func New(cfg *spotinst.Config) *Client {
	if cfg == nil {
		cfg = spotinst.DefaultConfig()
	}
	return &Client{cfg}
}
1185365
func New(settings SettingsManager, registry storage.ProviderRegistry) PoolManager {
	return &poolManager{settings, registry}
}
968791
func New(key string) *Client {
	config := ClientConfig{
		Scheme: defaultScheme,
		Host:   defaultHost,
		Port:   defaultPort,
		Key:    key,
	}
	return NewWithConfig(config)
}
1002035
func New(config types.Config) (*Potassium, error) {
	return &Potassium{config.Scheduler.MaxShare, config.Scheduler.ShareBase}, nil
}
220425
func New(e *xorm.Engine, keyPairs ...[]byte) (*Store, error) {
	return NewOptions(e, Options{}, keyPairs...)
}