// New creates, initializes and then returns a new Kite instance.
//
// Version must be in 3-digit semantic form.
//
// Name is important that it's also used to be searched by others.
354109
func New(name, version string) *Kite {
	return NewWithConfig(name, version, config.New())
}
846385
func New(ie interface{}, a ...interface{}) error {
	if ie == nil {
		return nil
	}
	switch err := ie.(type) {
	case *Error:
		return err
	case string:
		return newError(err, 2, a...)
	case error:
		return newError(err, 2, a...)
	default:
		panic("invalid error type")
	}
}
1319460
func New(ctx context.Context, next http.Handler, config config.StripPrefixRegex, name string) (http.Handler, error) {
	middlewares.GetLogger(ctx, name, typeName).Debug("Creating middleware")

	stripPrefix := stripPrefixRegex{
		next:   next,
		router: mux.NewRouter(),
		name:   name,
	}

	for _, prefix := range config.Regex {
		stripPrefix.router.PathPrefix(prefix)
	}

	return &stripPrefix, nil
}
971413
func New(m *GinJWTMiddleware) (*GinJWTMiddleware, error) {
	if err := m.MiddlewareInit(); err != nil {
		return nil, err
	}

	return m, nil
}
1215225
func (factory *TimeBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := TimeBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
1330822
func New(message string) error {
	return &fundamental{
		msg:   message,
		Stack: stack.New(1),
	}
}
813412
func New(c *client.Client, prefix string) *Record {
	return &Record{c, prefix}
}
1017410
func (factory *GitHubBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := GitHubBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

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

	return &bee
}
948812
func New() *MT19937 {
	res := &MT19937{
		state: make([]uint64, n),
		index: notSeeded,
	}
	return res
}
60068
func (factory *CleverbotBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := CleverbotBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
836561
func (c Client) New(params *stripe.EphemeralKeyParams) (*stripe.EphemeralKey, error) {
	if params.StripeVersion == nil || len(stripe.StringValue(params.StripeVersion)) == 0 {
		return nil, fmt.Errorf("params.StripeVersion must be specified")
	}

	if params.Headers == nil {
		params.Headers = make(http.Header)
	}
	params.Headers.Add("Stripe-Version", stripe.StringValue(params.StripeVersion))

	ephemeralKey := &stripe.EphemeralKey{}
	err := c.B.Call(http.MethodPost, "/v1/ephemeral_keys", c.Key, params, ephemeralKey)
	return ephemeralKey, err
}
663189
func New(logger log.Logger, helmClient *k8shelm.Client) *Release {
	r := &Release{
		logger:     logger,
		HelmClient: helmClient,
	}
	return r
}
467341
func New(ctx context.Context, cfg *config.Config, sv semver.Version) (*Action, error) {
	return newAction(ctx, cfg, sv)
}
679961
func (factory *SocketBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := SocketBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
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
}
340129
func New(global interface{}, localPath string, flag interface{}) (_ interface{}, err error) {
	// Local config
	if localPath != "" {
		if _, err = toml.DecodeFile(localPath, global); err != nil {
			err = errors.Wrapf(err, "asticonfig: toml decoding %s failed", localPath)
			return
		}
	}

	// Merge configs
	if err = mergo.Merge(flag, global); err != nil {
		err = errors.Wrap(err, "asticonfig: merging configs failed")
		return
	}
	return flag, nil
}