// New returns a new Sling with an http DefaultClient.
979874
func New() *Sling {
	return &Sling{
		httpClient:      http.DefaultClient,
		method:          "GET",
		header:          make(http.Header),
		queryStructs:    make([]interface{}, 0),
		responseDecoder: jsonDecoder{},
	}
}
88224
func New(opts ...OptionFunc) *HTTPBin {
	h := &HTTPBin{
		MaxBodySize: DefaultMaxBodySize,
		MaxDuration: DefaultMaxDuration,
	}
	for _, opt := range opts {
		opt(h)
	}
	return h
}
795256
func New(addr string) (VtctlClient, error) {
	factory, ok := factories[*vtctlClientProtocol]
	if !ok {
		return nil, fmt.Errorf("unknown vtctl client protocol: %v", *vtctlClientProtocol)
	}
	return factory(addr)
}
305665
func New() http.Handler {
	r := mux.NewRouter()

	r.HandleFunc("/", actionHandler).Methods("GET", "POST")
	r.HandleFunc("/{account}", actionHandler).Methods("GET", "POST")
	r.HandleFunc("/queue/{queueName}", actionHandler).Methods("GET", "POST")
	r.HandleFunc("/{account}/{queueName}", actionHandler).Methods("GET", "POST")
	r.HandleFunc("/SimpleNotificationService/{id}.pem", pemHandler).Methods("GET")
	r.HandleFunc("/health", health).Methods("GET")

	return r
}
1072939
func New(URL string) (p *Provider, err error) {
	u, err := url.Parse(URL)
	if err != nil {
		return
	}
	if !strings.Contains(u.Scheme, "tcp") {
		err = errInvalidURL
		return
	}
	var clientPort int
	if u.Port() != "" {
		clientPort, err = strconv.Atoi(u.Port())
		if err != nil {
			return
		}
	}
	p = &Provider{
		Host: u.Hostname(),
		Port: clientPort,
	}
	return
}
1224226
func New(config fab.EndpointConfig, opts ...options.Opt) (*ChannelProvider, error) {
	return &ChannelProvider{
		ctxtCaches: lazycache.New(
			"Client_Context_Cache",
			func(key lazycache.Key) (interface{}, error) {
				ck := key.(*ctxtCacheKey)
				return newContextCache(ck.context, opts), nil
			},
		),
	}, nil
}
1304875
func New(ctx context.Context, next http.Handler, config config.ReplacePath, name string) (http.Handler, error) {
	middlewares.GetLogger(ctx, name, typeName).Debug("Creating middleware")

	return &replacePath{
		next: next,
		path: config.Path,
		name: name,
	}, nil
}
555586
func New(writer http.ResponseWriter, httpStatus int, message string) {
	response := &response{
		Response: message,
	}

	jsonResponse, err := json.Marshal(response)
	if err != nil {
		http.Error(writer, err.Error(), http.StatusInternalServerError)
	}

	writer.Header().Set("Content-Type", "application/json")
	writer.WriteHeader(httpStatus)
	writer.Write(jsonResponse)
}
532414
func New(uri string) Client {
	return &client{http.DefaultClient, strings.TrimSuffix(uri, "/")}
}
569682
func New(token string, options ...Option) *Client {
	s := &Client{
		token:      token,
		endpoint:   APIURL,
		httpclient: &http.Client{},
		log:        log.New(os.Stderr, "nlopes/slack", log.LstdFlags|log.Lshortfile),
	}

	for _, opt := range options {
		opt(s)
	}

	return s
}
1082538
func New(scheme, host string, port uint16) (*Client, error) {
	client := &Client{
		Scheme: scheme,
		Host:   host,
		Port:   port,
	}

	return client, nil
}
251375
func New(url string, opts ...DevToolsOption) *DevTools {
	devtools := &DevTools{url: url}
	for _, o := range opts {
		o(devtools)
	}
	if devtools.client == nil {
		devtools.client = &http.Client{}
	}
	return devtools
}
1090731
func New(options *AuthOptions, httpClient *http.Client) *Client {
	if httpClient == nil {
		httpClient = http.DefaultClient
	}

	return &Client{
		Options: options,
		Client:  httpClient,
	}
}
876226
func New(url string, target Target, httpClient *http.Client) *Download {
	return &Download{
		HttpClient: httpClient,
		Progress:   make(chan int),
		Method:     "GET",
		Url:        url,
		Target:     target,
	}
}
153099
func New() Router {
	c := alice.New()
	r := httprouter.New()
	return &router{r, newGroup("", c, r, evtHandler)}
}
35676
func New(cfgs ...ConfigFunc) *Client {
	c := &Client{
		http.Client{Transport: http.DefaultTransport},
		*NewIdentity(),
		*NewCatalog(),
		*NewMarketplace(),
	}

	c.IdentityClient.common.backend.(*defaultBackend).client = &c.client
	c.CatalogClient.common.backend.(*defaultBackend).client = &c.client
	c.MarketplaceClient.common.backend.(*defaultBackend).client = &c.client

	ForURLPattern(DefaultURLPattern)(c)

	for _, cfg := range cfgs {
		cfg(c)
	}

	// We need to do this after we've set the configuration. In case someone
	// provided a UserAgent, it will get loaded and overwrite our defaults since
	// we re-assign the previous transport after this.
	WithUserAgent("")(c)
	WithAPIToken(os.Getenv("MANIFOLD_API_TOKEN"))(c)

	return c
}
1247325
func New(cfg Config, url string) *Hook {
	return NewClient(cfg, webhook.New(url))
}