From 617f1b5b3660ca3ac5328c7784738ccb58140930 Mon Sep 17 00:00:00 2001 From: rbajollari Date: Thu, 28 Mar 2024 14:52:37 -0400 Subject: [PATCH] lint --- cmd/version.go | 2 +- oracle/types/currency.go | 2 +- router/v1/router.go | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/version.go b/cmd/version.go index 579a416a..51b5e0c9 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -37,7 +37,7 @@ func getVersionCmd() *cobra.Command { versionCmd := &cobra.Command{ Use: "version", Short: "Print binary version information", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, args []string) error { verInfo := versionInfo{ Version: Version, Commit: Commit, diff --git a/oracle/types/currency.go b/oracle/types/currency.go index e52f7d23..d741d512 100644 --- a/oracle/types/currency.go +++ b/oracle/types/currency.go @@ -30,7 +30,7 @@ func MapPairsToSlice(mapPairs map[string]CurrencyPair) []CurrencyPair { return currencyPairs } -func (cp CurrencyPair) MarshalText() (text []byte, err error) { +func (cp CurrencyPair) MarshalText() ([]byte, error) { type noMethod CurrencyPair return json.Marshal(noMethod(cp)) } diff --git a/router/v1/router.go b/router/v1/router.go index deeb8852..84ecbb91 100644 --- a/router/v1/router.go +++ b/router/v1/router.go @@ -89,7 +89,7 @@ func (r *Router) RegisterRoutes(rtr *mux.Router, prefix string) { } func (r *Router) healthzHandler() http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { + return func(w http.ResponseWriter, _ *http.Request) { resp := HealthZResponse{ Status: StatusAvailable, } @@ -101,7 +101,7 @@ func (r *Router) healthzHandler() http.HandlerFunc { } func (r *Router) pricesHandler() http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { + return func(w http.ResponseWriter, _ *http.Request) { resp := PricesResponse{ Prices: r.oracle.GetPrices(), } @@ -111,7 +111,7 @@ func (r *Router) pricesHandler() http.HandlerFunc { } func (r *Router) candlePricesHandler() http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { + return func(w http.ResponseWriter, _ *http.Request) { resp := PricesPerProviderResponse{ Prices: r.oracle.GetTvwapPrices(), } @@ -121,7 +121,7 @@ func (r *Router) candlePricesHandler() http.HandlerFunc { } func (r *Router) tickerPricesHandler() http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { + return func(w http.ResponseWriter, _ *http.Request) { resp := PricesPerProviderResponse{ Prices: r.oracle.GetVwapPrices(), }