From 401a543f4cb703158eed9e5eea3e99772983b58a Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Mon, 5 Dec 2022 19:03:59 +0100 Subject: [PATCH] Fix variable name Signed-off-by: Antonio Navarro Perez --- config/routing.go | 10 +++++----- routing/delegated.go | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/routing.go b/config/routing.go index 67bded538..90d91d28b 100644 --- a/config/routing.go +++ b/config/routing.go @@ -79,8 +79,8 @@ func (r *RouterParser) UnmarshalJSON(b []byte) error { var p interface{} switch out.Type { - case RouterTypeHttp: - p = &HttpRouterParams{} + case RouterTypeHTTP: + p = &HTTPRouterParams{} case RouterTypeReframe: p = &ReframeRouterParams{} case RouterTypeDHT: @@ -107,7 +107,7 @@ type RouterType string const ( RouterTypeReframe RouterType = "reframe" - RouterTypeHttp RouterType = "http" + RouterTypeHTTP RouterType = "http" RouterTypeDHT RouterType = "dht" RouterTypeSequential RouterType = "sequential" RouterTypeParallel RouterType = "parallel" @@ -139,7 +139,7 @@ type ReframeRouterParams struct { Endpoint string } -type HttpRouterParams struct { +type HTTPRouterParams struct { // Endpoint is the URL where the routing implementation will point to get the information. Endpoint string @@ -151,7 +151,7 @@ type HttpRouterParams struct { MaxProvideConcurrency int } -func (hrp *HttpRouterParams) FillDefaults() { +func (hrp *HTTPRouterParams) FillDefaults() { if hrp.MaxProvideBatchSize == 0 { hrp.MaxProvideBatchSize = 100 } diff --git a/routing/delegated.go b/routing/delegated.go index 075c67fa1..953cfac00 100644 --- a/routing/delegated.go +++ b/routing/delegated.go @@ -93,7 +93,7 @@ func parse(visited map[string]bool, var router routing.Routing var err error switch cfg.Type { - case config.RouterTypeHttp: + case config.RouterTypeHTTP: router, err = httpRoutingFromConfig(cfg.Router, extraHTTP) case config.RouterTypeReframe: router, err = reframeRoutingFromConfig(cfg.Router, extraHTTP) @@ -158,7 +158,7 @@ type ExtraHTTPParams struct { } func httpRoutingFromConfig(conf config.Router, extraHTTP *ExtraHTTPParams) (routing.Routing, error) { - params := conf.Parameters.(*config.HttpRouterParams) + params := conf.Parameters.(*config.HTTPRouterParams) if params.Endpoint == "" { return nil, NewParamNeededErr("Endpoint", conf.Type) }