Fix variable name
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Antonio Navarro Perez committed
Dec 5, 2022 at 19:03 UTC
401a543f4cb703158eed9e5eea3e99772983b58a
2 files changed
+7
-7
config/routing.go
+5
-5
@@ -79,8 +79,8 @@ func (r *RouterParser) UnmarshalJSON(b []byte) error {
79
80
var p interface{}
81
switch out.Type {
82
- case RouterTypeHttp:
83
- p = &HttpRouterParams{}
82
+ case RouterTypeHTTP:
83
+ p = &HTTPRouterParams{}
84
case RouterTypeReframe:
85
p = &ReframeRouterParams{}
86
case RouterTypeDHT:
@@ -107,7 +107,7 @@ type RouterType string
107
108
const (
109
RouterTypeReframe RouterType = "reframe"
110
- RouterTypeHttp RouterType = "http"
110
+ RouterTypeHTTP RouterType = "http"
111
RouterTypeDHT RouterType = "dht"
112
RouterTypeSequential RouterType = "sequential"
113
RouterTypeParallel RouterType = "parallel"
@@ -139,7 +139,7 @@ type ReframeRouterParams struct {
139
Endpoint string
140
}
141
142
-type HttpRouterParams struct {
142
+type HTTPRouterParams struct {
143
// Endpoint is the URL where the routing implementation will point to get the information.
144
Endpoint string
145
@@ -151,7 +151,7 @@ type HttpRouterParams struct {
151
MaxProvideConcurrency int
152
}
153
154
-func (hrp *HttpRouterParams) FillDefaults() {
154
+func (hrp *HTTPRouterParams) FillDefaults() {
155
if hrp.MaxProvideBatchSize == 0 {
156
hrp.MaxProvideBatchSize = 100
157
}
routing/delegated.go
+2
-2
@@ -93,7 +93,7 @@ func parse(visited map[string]bool,
93
var router routing.Routing
94
var err error
95
switch cfg.Type {
96
- case config.RouterTypeHttp:
96
+ case config.RouterTypeHTTP:
97
router, err = httpRoutingFromConfig(cfg.Router, extraHTTP)
98
case config.RouterTypeReframe:
99
router, err = reframeRoutingFromConfig(cfg.Router, extraHTTP)
@@ -158,7 +158,7 @@ type ExtraHTTPParams struct {
158
}
159
160
func httpRoutingFromConfig(conf config.Router, extraHTTP *ExtraHTTPParams) (routing.Routing, error) {
161
- params := conf.Parameters.(*config.HttpRouterParams)
161
+ params := conf.Parameters.(*config.HTTPRouterParams)
162
if params.Endpoint == "" {
163
return nil, NewParamNeededErr("Endpoint", conf.Type)
164
}