Skip to content

Commit

Permalink
style: format code with Go fmt and Gofumpt
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in 52885ad according to the output
from Go fmt and Gofumpt.

Details: #1
  • Loading branch information
deepsource-autofix[bot] committed Jan 12, 2024
1 parent 52885ad commit dd1287d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 28 deletions.
34 changes: 16 additions & 18 deletions lura/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,22 @@ import (
clienthttp "github.com/krakend/krakend-otel/http/client"
)

var (
defaultOpts = otelconfig.BackendOpts{
Metrics: &otelconfig.BackendMetricOpts{
DisableStage: false,
RoundTrip: true,
ReadPayload: true,
DetailedConnection: true,
StaticAttributes: make(map[string]string),
},
Traces: &otelconfig.BackendTraceOpts{
DisableStage: false,
RoundTrip: true,
ReadPayload: true,
DetailedConnection: true,
StaticAttributes: make(map[string]string),
},
}
)
var defaultOpts = otelconfig.BackendOpts{
Metrics: &otelconfig.BackendMetricOpts{
DisableStage: false,
RoundTrip: true,
ReadPayload: true,
DetailedConnection: true,
StaticAttributes: make(map[string]string),
},
Traces: &otelconfig.BackendTraceOpts{
DisableStage: false,
RoundTrip: true,
ReadPayload: true,
DetailedConnection: true,
StaticAttributes: make(map[string]string),
},
}

// HTTPRequestExecutorFromConfig creates an HTTPRequestExecutor to be used
// for the backend requests.
Expand Down
14 changes: 6 additions & 8 deletions router/gin/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ import (
"github.com/krakend/krakend-otel/state"
)

var (
defaultSkipPaths = []string{
"/healthz",
"/_ah/health",
"/__debug",
"/__echo",
}
)
var defaultSkipPaths = []string{
"/healthz",
"/_ah/health",
"/__debug",
"/__echo",
}

// defaultRouterOpts return the default options when no options
// are provided
Expand Down
4 changes: 2 additions & 2 deletions router/gin/propagation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
)

func PropagationMiddleware(next gin.HandlerFunc,
prop propagation.TextMapPropagator) gin.HandlerFunc {

prop propagation.TextMapPropagator,
) gin.HandlerFunc {
if prop == nil {
return next
}
Expand Down

0 comments on commit dd1287d

Please sign in to comment.