Skip to content

Commit aa7e417

Browse files
committed
WIP - fix linting issues
1 parent 8b2981d commit aa7e417

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

internal/k8s/configuration.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func (vsc *VirtualServerConfiguration) IsEqual(resource Resource) bool {
274274
}
275275
}
276276

277-
//TODO: check all values of the map
277+
// TODO: check all values of the map
278278
if len(vsc.VirtualServerRouteSelectors) != len(vsConfig.VirtualServerRouteSelectors) {
279279
return false
280280
}
@@ -353,7 +353,7 @@ type TransportServerMetrics struct {
353353
// The IC needs to ensure that at any point in time the NGINX config on the filesystem reflects the state
354354
// of the objects in the Configuration.
355355
type Configuration struct {
356-
//Context context.Context
356+
// Context context.Context
357357

358358
logger *slog.Logger
359359

@@ -399,7 +399,7 @@ type Configuration struct {
399399

400400
// NewConfiguration creates a new Configuration.
401401
func NewConfiguration(
402-
//ctx context.Context,
402+
// ctx context.Context,
403403
logger *slog.Logger,
404404
hasCorrectIngressClass func(interface{}) bool,
405405
isPlus bool,
@@ -414,10 +414,10 @@ func NewConfiguration(
414414
isCertManagerEnabled bool,
415415
isIPV6Disabled bool,
416416
) *Configuration {
417-
//l := nl.LoggerFromContext(ctx)
417+
// l := nl.LoggerFromContext(ctx)
418418

419419
return &Configuration{
420-
//Context: ctx,
420+
// Context: ctx,
421421
logger: logger,
422422
hosts: make(map[string]Resource),
423423
listenerHosts: make(map[listenerHostKey]*TransportServerConfiguration),
@@ -445,7 +445,7 @@ func NewConfiguration(
445445
snippetsEnabled: snippetsEnabled,
446446
isCertManagerEnabled: isCertManagerEnabled,
447447
isIPV6Disabled: isIPV6Disabled,
448-
//logger: l,
448+
// logger: l,
449449
}
450450
}
451451

@@ -1439,7 +1439,7 @@ func squashResourceChanges(changes []ResourceChange) []ResourceChange {
14391439
}
14401440

14411441
func (c *Configuration) buildHostsAndResources() (newHosts map[string]Resource, newResources map[string]Resource) {
1442-
//l := nl.LoggerFromContext(c.Context)
1442+
// l := nl.LoggerFromContext(c.Context)
14431443
newHosts = make(map[string]Resource)
14441444
newResources = make(map[string]Resource)
14451445
var challengesVSR []*conf_v1.VirtualServerRoute
@@ -1504,7 +1504,7 @@ func (c *Configuration) buildHostsAndResources() (newHosts map[string]Resource,
15041504
resource := NewVirtualServerConfiguration(vs, vsrs, routeSelectorMap, warnings)
15051505

15061506
// todo - uncomment (Jakub)
1507-
//nl.Infof(c.logger, "resource: %v", resource)
1507+
// nl.Infof(c.logger, "resource: %v", resource)
15081508

15091509
c.buildListenersForVSConfiguration(resource)
15101510

@@ -1659,7 +1659,7 @@ func (c *Configuration) buildMinionConfigs(masterHost string) ([]*MinionConfigur
16591659
}
16601660

16611661
func (c *Configuration) buildVirtualServerRoutes(vs *conf_v1.VirtualServer) ([]*conf_v1.VirtualServerRoute, map[string][]string, []string) {
1662-
//l := nl.LoggerFromContext(c.Context)
1662+
// l := nl.LoggerFromContext(c.Context)
16631663
var vsrs []*conf_v1.VirtualServerRoute
16641664
var routeSelectorMap map[string][]string
16651665
var warnings []string
@@ -1698,7 +1698,7 @@ func (c *Configuration) buildVirtualServerRoutes(vs *conf_v1.VirtualServer) ([]*
16981698

16991699
selectorKey := sel.String()
17001700

1701-
//routeSelectorMap[selectorKey] := []*conf_v1.VirtualServerRoute{}
1701+
// routeSelectorMap[selectorKey] := []*conf_v1.VirtualServerRoute{}
17021702

17031703
if err != nil {
17041704
warning := fmt.Sprintf("VirtualServerRoute LabelSelector %s is invalid: %v", selector, err)
@@ -1727,7 +1727,6 @@ func (c *Configuration) buildVirtualServerRoutes(vs *conf_v1.VirtualServer) ([]*
17271727
}
17281728

17291729
}
1730-
17311730
}
17321731

17331732
return vsrs, routeSelectorMap, warnings

0 commit comments

Comments
 (0)