// New creates the help command.
421984
func New(store storage.Store, builder literal.Builder, chanSize, bulkSize int) *command.Command {
	cmd := &command.Command{
		UsageLine: "assert folder_path",
		Short:     "asserts all the stories in the indicated folder.",
		Long: `Asserts all the stories in the folder. Each story is stored in a JSON
file containing all the sources and all the assertions to run.
`,
	}
	cmd.Run = func(ctx context.Context, args []string) int {
		return assertCommand(ctx, cmd, args, store, builder, chanSize, bulkSize)
	}
	return cmd
}
455627
func New() (*Client, error) {
	cmd := exec.Command(GetBinary())
	stdin, err := cmd.StdinPipe()
	if err != nil {
		return nil, err
	}

	stdout, err := cmd.StdoutPipe()
	if err != nil {
		return nil, err
	}

	br := bufio.NewReader(stdout)
	if err := cmd.Start(); err != nil {
		return nil, err
	}

	// check welcome message
	banner, _, err := br.ReadLine()
	if err != nil {
		return nil, err
	}
	if !bytes.HasPrefix(banner, []byte("OK")) {
		return nil, fmt.Errorf("wrong banner: %s", banner)
	}

	cl := &Client{
		cmd: cmd,
		in:  stdin,
		out: br,
	}

	return cl, nil
}
124363
func New(params *stripe.TerminalConnectionTokenParams) (*stripe.TerminalConnectionToken, error) {
	return getC().New(params)
}
1023970
func New() *Ctrlc {
	return &Ctrlc{
		signals: make(chan os.Signal, 1),
		errs:    make(chan error, 1),
	}
}
14932
func (c Client) New(params *stripe.TerminalReaderParams) (*stripe.TerminalReader, error) {
	reader := &stripe.TerminalReader{}
	err := c.B.Call(http.MethodPost, "/v1/terminal/readers", c.Key, params, reader)
	return reader, err
}
1321872
func New(config string) (result *comm, err error) {
	// Establish an initial connection and connect
	result = &comm{
		config: config,
	}

	return
}
563158
func New(c Config) (Monitor, error) {
	m := &monitor{
		tip:            []string{""},
		path:           c.Path,
		scanner:        c.Scanner,
		sorter:         c.Sorter,
	}

	if err := m.sync(); err != nil {
		return nil, err
	}

	return m, nil
}
1288991
func New() (e *Echo) {
	return NewWithContext(func(e *Echo) Context {
		return NewContext(nil, nil, e)
	})
}
518278
func New(options ...func(*Checker)) *Checker {
	c := &Checker{}
	for _, option := range options {
		option(c)
	}
	return c
}
1071479
func New(initializer Initializer, opts ...options.Opt) *Reference {
	return NewWithData(func(interface{}) (interface{}, error) {
		return initializer()
	}, opts...)
}
51346
func New(cnf *config.Config, host, password, socketPath string, db int) iface.Backend {
	return &Backend{
		Backend:    common.NewBackend(cnf),
		host:       host,
		db:         db,
		password:   password,
		socketPath: socketPath,
	}
}
248343
func New(s *terraform.InstanceState) (*Communicator, error) {
	connInfo, err := parseConnectionInfo(s)
	if err != nil {
		return nil, err
	}

	endpoint := &winrm.Endpoint{
		Host:     connInfo.Host,
		Port:     connInfo.Port,
		HTTPS:    connInfo.HTTPS,
		Insecure: connInfo.Insecure,
	}
	if len(connInfo.CACert) > 0 {
		endpoint.CACert = []byte(connInfo.CACert)
	}

	comm := &Communicator{
		connInfo: connInfo,
		endpoint: endpoint,
		// Seed our own rand source so that script paths are not deterministic
		rand: rand.New(rand.NewSource(time.Now().UnixNano())),
	}

	return comm, nil
}
1243785
func New(ctx context.Context, id string, publisher shim.Publisher, shutdown func()) (shim.Shim, error) {
	return &service{
		context:   ctx,
		id:        id,
		processes: make(map[string]*process),
		publisher: publisher,
		shutdown:  shutdown,
	}, nil
}
6369
func (e *ErrorClass) New(format string, args ...interface{}) error {
	return e.wrap(fmt.Errorf(format, args...), nil, nil)
}
978803
func New(format string, args ...interface{}) error {
	return annotate(errors.New(fmt.Sprintf(format, args...)), "")
}
622866
func New(message string, field string, kind Kind) Error {
	return Error{message, field, 0, kind}
}
528535
func New(msg string, a ...interface{}) Error {
	msg = fmt.Sprintf(msg, a...)
	return Error{
		error: errors.New(msg),
	}
}