Skip to content

Commit 0f50b21

Browse files
style: format code with Go fmt and Gofumpt
This commit fixes the style issues introduced in 2f3fb7b according to the output from Go fmt and Gofumpt. Details: #1
1 parent 2f3fb7b commit 0f50b21

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

lura/backend.go

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ var defaultOpts = otelconfig.BackendOpts{
3636
func HTTPRequestExecutorFromConfig(clientFactory transport.HTTPClientFactory,
3737
cfg *config.Backend, opts *otelconfig.BackendOpts, skipPaths []string,
3838
) transport.HTTPRequestExecutor {
39-
4039
for _, sp := range skipPaths {
4140
if cfg.ParentEndpoint == sp {
4241
// TODO: check if there might be some othe executor that is

lura/proxy.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ func Middleware(name string, stage string, gsf state.GetterFn, metricsEnabled bo
122122
// ProxyFactory returns a pipe stage factory that wraps the provided proxy factory with the
123123
// instrumentation [Middleware] based on the configuration options.
124124
func ProxyFactory(pf proxy.Factory, gsfn state.GetterFn, opts *kotelconfig.PipeOpts,
125-
skipPaths []string) proxy.FactoryFunc {
126-
125+
skipPaths []string,
126+
) proxy.FactoryFunc {
127127
if opts == nil {
128128
return pf.New
129129
}
@@ -161,8 +161,8 @@ func ProxyFactory(pf proxy.Factory, gsfn state.GetterFn, opts *kotelconfig.PipeO
161161
// BackendFactory returns a backend factory that wraps the provided backend factory with the
162162
// instrumentation [Middleware] based on the configuration options.
163163
func BackendFactory(bf proxy.BackendFactory, gsfn state.GetterFn, opts *kotelconfig.BackendOpts,
164-
skipPaths []string) proxy.BackendFactory {
165-
164+
skipPaths []string,
165+
) proxy.BackendFactory {
166166
if opts == nil || (opts.Metrics.DisableStage && opts.Traces.DisableStage) {
167167
return bf
168168
}

router/gin/endpoint.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import (
1919

2020
// New wraps a handler factory adding some simple instrumentation to the generated handlers
2121
func New(hf krakendgin.HandlerFactory, gsfn state.GetterFn,
22-
opts *kconfig.RouterOpts, skipPaths []string) krakendgin.HandlerFactory {
23-
22+
opts *kconfig.RouterOpts, skipPaths []string,
23+
) krakendgin.HandlerFactory {
2424
if gsfn == nil {
2525
gsfn = state.GlobalState
2626
}
@@ -32,8 +32,8 @@ func New(hf krakendgin.HandlerFactory, gsfn state.GetterFn,
3232
// HandlerFunc creates and instrumented gin.Handler wrapper with traces and / or metrics enabled
3333
// according to the [config.RouterOpts].
3434
func HandlerFunc(cfg *config.EndpointConfig, opts *kconfig.RouterOpts, gsfn state.GetterFn,
35-
skipPaths []string, next gin.HandlerFunc) gin.HandlerFunc {
36-
35+
skipPaths []string, next gin.HandlerFunc,
36+
) gin.HandlerFunc {
3737
// skip paths will not try to read the propagation header, because nothing
3838
// in the downstream pipeline will be instruemented. The header can be passed
3939
// using the regular `headers` feature.

0 commit comments

Comments
 (0)