diff --git a/Makefile b/Makefile index 5db061e..8b30e4f 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,7 @@ clean: format: mod-tidy go fmt ./... + gofmt -s -w $(GO_FILES) golines: golines -w --ignore-generated --chain-split-dots --max-len=80 --reformat-tags . diff --git a/internal/api/api.go b/internal/api/api.go index b37b25f..3a8f148 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -78,7 +78,12 @@ func Start(cfg *config.Config) error { // Configure CORS corsConfig := cors.DefaultConfig() corsConfig.AllowAllOrigins = true - corsConfig.AllowHeaders = []string{"hx-current-url","hx-request","hx-target","hx-trigger"} + corsConfig.AllowHeaders = []string{ + "hx-current-url", + "hx-request", + "hx-target", + "hx-trigger", + } router.Use(cors.New(corsConfig)) // Access logging accessLogger := logging.GetAccessLogger() @@ -143,8 +148,12 @@ func Start(cfg *config.Config) error { _ = ginmetrics.GetMonitor().AddMetric(failureMetric) _ = ginmetrics.GetMonitor().AddMetric(submittedMetric) // Initialize metrics - _ = ginmetrics.GetMonitor().GetMetric("tx_submit_fail_count").SetGaugeValue(nil, 0.0) - _ = ginmetrics.GetMonitor().GetMetric("tx_submit_count").SetGaugeValue(nil, 0.0) + _ = ginmetrics.GetMonitor(). + GetMetric("tx_submit_fail_count"). + SetGaugeValue(nil, 0.0) + _ = ginmetrics.GetMonitor(). + GetMetric("tx_submit_count"). + SetGaugeValue(nil, 0.0) // Start metrics listener go func() {