luraproject / lura

Documentation of an exported function should start with the function’s name GO-D5001
Documentation
Minor
6 months ago8 months old
comment on exported function NewConcurrentMiddleware should be of the form "NewConcurrentMiddleware ..."
58	}
59}
60
61// NewConcurrentMiddlewareWithLogger creates a proxy middleware that enables sending several requests concurrently.62// Is recommended to use the version with a logger param.
63func NewConcurrentMiddleware(remote *config.Backend) Middleware {
64	return NewConcurrentMiddlewareWithLogger(logging.NoOp, remote)
comment on exported function EmptyMiddlewareWithLogger should be of the form "EmptyMiddlewareWithLogger ..."
 81//	response, err := p(ctx, r)
 82type Middleware func(next ...Proxy) Proxy
 83
 84// EmptyMiddlewareWithLoggger is a dummy middleware, useful for testing and fallback 85func EmptyMiddlewareWithLogger(logger logging.Logger, next ...Proxy) Proxy {
 86	if len(next) > 1 {
 87		logger.Fatal("too many proxies for this proxy middleware: EmptyMiddleware only accepts 1 proxy, got %d", len(next))