1
0
Fork 0

Update linter

This commit is contained in:
Ludovic Fernandez 2020-05-11 12:06:07 +02:00 committed by GitHub
parent f12c27aa7c
commit 328611c619
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
157 changed files with 489 additions and 508 deletions

View file

@ -33,7 +33,7 @@ type serviceManager interface {
LaunchHealthCheck()
}
// Manager A route/router manager
// Manager A route/router manager.
type Manager struct {
routerHandlers map[string]http.Handler
serviceManager serviceManager
@ -43,7 +43,7 @@ type Manager struct {
conf *runtime.Configuration
}
// NewManager Creates a new Manager
// NewManager Creates a new Manager.
func NewManager(conf *runtime.Configuration,
serviceManager serviceManager,
middlewaresBuilder middlewareBuilder,
@ -68,7 +68,7 @@ func (m *Manager) getHTTPRouters(ctx context.Context, entryPoints []string, tls
return make(map[string]map[string]*runtime.RouterInfo)
}
// BuildHandlers Builds handler for all entry points
// BuildHandlers Builds handler for all entry points.
func (m *Manager) BuildHandlers(rootCtx context.Context, entryPoints []string, tls bool) map[string]http.Handler {
entryPointHandlers := make(map[string]http.Handler)

View file

@ -21,7 +21,7 @@ const (
defaultTLSStoreName = "default"
)
// NewManager Creates a new Manager
// NewManager Creates a new Manager.
func NewManager(conf *runtime.Configuration,
serviceManager *tcpservice.Manager,
httpHandlers map[string]http.Handler,
@ -37,7 +37,7 @@ func NewManager(conf *runtime.Configuration,
}
}
// Manager is a route/router manager
// Manager is a route/router manager.
type Manager struct {
serviceManager *tcpservice.Manager
httpHandlers map[string]http.Handler
@ -62,7 +62,7 @@ func (m *Manager) getHTTPRouters(ctx context.Context, entryPoints []string, tls
return make(map[string]map[string]*runtime.RouterInfo)
}
// BuildHandlers builds the handlers for the given entrypoints
// BuildHandlers builds the handlers for the given entrypoints.
func (m *Manager) BuildHandlers(rootCtx context.Context, entryPoints []string) map[string]*tcp.Router {
entryPointsRouters := m.getTCPRouters(rootCtx, entryPoints)
entryPointsRoutersHTTP := m.getHTTPRouters(rootCtx, entryPoints, true)
@ -117,7 +117,7 @@ func (m *Manager) buildEntryPointHandler(ctx context.Context, configs map[string
domains, err := rules.ParseDomains(routerHTTPConfig.Rule)
if err != nil {
routerErr := fmt.Errorf("invalid rule %s, error: %v", routerHTTPConfig.Rule, err)
routerErr := fmt.Errorf("invalid rule %s, error: %w", routerHTTPConfig.Rule, err)
routerHTTPConfig.AddError(routerErr, true)
logger.Debug(routerErr)
continue

View file

@ -12,7 +12,7 @@ import (
"github.com/containous/traefik/v2/pkg/udp"
)
// NewManager Creates a new Manager
// NewManager Creates a new Manager.
func NewManager(conf *runtime.Configuration,
serviceManager *udpservice.Manager,
) *Manager {
@ -22,7 +22,7 @@ func NewManager(conf *runtime.Configuration,
}
}
// Manager is a route/router manager
// Manager is a route/router manager.
type Manager struct {
serviceManager *udpservice.Manager
conf *runtime.Configuration
@ -36,7 +36,7 @@ func (m *Manager) getUDPRouters(ctx context.Context, entryPoints []string) map[s
return make(map[string]map[string]*runtime.UDPRouterInfo)
}
// BuildHandlers builds the handlers for the given entrypoints
// BuildHandlers builds the handlers for the given entrypoints.
func (m *Manager) BuildHandlers(rootCtx context.Context, entryPoints []string) map[string]udp.Handler {
entryPointsRouters := m.getUDPRouters(rootCtx, entryPoints)