Skip to content

Commit

Permalink
fixed formatting and copyright issues
Browse files Browse the repository at this point in the history
  • Loading branch information
maurafortino committed Jan 25, 2024
1 parent 36add17 commit ab7a1b7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,6 @@ var defaultConfig = Config{
ApplicationName: applicationName,
},
Sender: SenderConfig{
Linger: time.Duration(3 * time.Minute),
Linger: 3 * time.Minute,
},
}
2 changes: 1 addition & 1 deletion http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Check warning on line 146 in http.go

View check run for this annotation

Codecov / codecov/patch

http.go#L146

Added line #L146 was not covered by tests
}

func (sh *ServerHandler) fixWrp(msg *wrp.Message) *wrp.Message {
Expand Down
4 changes: 2 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 0 additions & 1 deletion metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/prometheus/client_golang/prometheus"
"go.uber.org/fx"

// nolint:staticcheck
"github.com/xmidt-org/touchstone"
)

Expand Down
4 changes: 2 additions & 2 deletions primaryHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Check warning on line 215 in primaryHandler.go

View check run for this annotation

Codecov / codecov/patch

primaryHandler.go#L214-L215

Added lines #L214 - L215 were not covered by tests
Endpoints: endpoints,
}
Expand All @@ -227,7 +227,7 @@ func authenticationMiddleware(v *viper.Viper, logger *zap.Logger) (*alice.Chain,
// basculehttp.WithEErrorResponseFunc(listener.OnErrorResponse),

Check warning on line 227 in primaryHandler.go

View check run for this annotation

Codecov / codecov/patch

primaryHandler.go#L227

Added line #L227 was not covered by tests
)

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

Check warning on line 231 in primaryHandler.go

View check run for this annotation

Codecov / codecov/patch

primaryHandler.go#L230-L231

Added lines #L230 - L231 were not covered by tests

versionCompatibleAuth := alice.New(func(next http.Handler) http.Handler {
Expand Down

0 comments on commit ab7a1b7

Please sign in to comment.