diff --git a/config.go b/config.go index a386e2c7..eda9e714 100644 --- a/config.go +++ b/config.go @@ -220,6 +220,6 @@ var defaultConfig = Config{ ApplicationName: applicationName, }, Sender: SenderConfig{ - Linger: time.Duration(3 * time.Minute), + Linger: 3 * time.Minute, }, } diff --git a/http.go b/http.go index ebae1afb..c8207e94 100644 --- a/http.go +++ b/http.go @@ -143,7 +143,7 @@ func (sh *ServerHandler) ServeHTTP(response http.ResponseWriter, request *http.R func (sh *ServerHandler) recordQueueLatencyToHistogram(startTime time.Time, eventType string) { endTime := sh.now() - sh.telemetry.incomingQueueLatency.With(prometheus.Labels{"event": eventType}).Observe(float64(endTime.Sub(startTime).Seconds())) + sh.telemetry.incomingQueueLatency.With(prometheus.Labels{"event": eventType}).Observe(endTime.Sub(startTime).Seconds()) } func (sh *ServerHandler) fixWrp(msg *wrp.Message) *wrp.Message { diff --git a/main_test.go b/main_test.go index 61d71934..8e1c72b9 100644 --- a/main_test.go +++ b/main_test.go @@ -1,5 +1,5 @@ -//SPDX-FileCopyrightText: 2023 Comcast Cable Communications Management, LLC -//SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 Comcast Cable Communications Management, LLC +// SPDX-License-Identifier: Apache-2.0 package main diff --git a/metrics.go b/metrics.go index 4e39b1a4..68494350 100644 --- a/metrics.go +++ b/metrics.go @@ -6,7 +6,6 @@ import ( "github.com/prometheus/client_golang/prometheus" "go.uber.org/fx" - // nolint:staticcheck "github.com/xmidt-org/touchstone" ) diff --git a/primaryHandler.go b/primaryHandler.go index 8b72931d..cb2d38e4 100644 --- a/primaryHandler.go +++ b/primaryHandler.go @@ -211,7 +211,7 @@ func authenticationMiddleware(v *viper.Viper, logger *zap.Logger) (*alice.Chain, endpoints = append(endpoints, r) } m := basculehelper.MetricValidator{ - C: basculehelper.CapabilitiesValidator{Checker: c}, + C: basculehelper.CapabilitiesValidator{Checker: c}, // Measures: capabilityCheckMeasures, Endpoints: endpoints, } @@ -227,7 +227,7 @@ func authenticationMiddleware(v *viper.Viper, logger *zap.Logger) (*alice.Chain, // basculehttp.WithEErrorResponseFunc(listener.OnErrorResponse), ) - authChain := alice.New(setLogger(logger), authConstructor, authEnforcer) //removing: basculehttp.NewListenerDecorator(listener). commenting for now in case needed later + authChain := alice.New(setLogger(logger), authConstructor, authEnforcer) //removing: basculehttp.NewListenerDecorator(listener). commenting for now in case needed later authChainLegacy := alice.New(setLogger(logger), authConstructorLegacy, authEnforcer) //removing: basculehttp.NewListenerDecorator(listener) commenting for now in case needed later versionCompatibleAuth := alice.New(func(next http.Handler) http.Handler {