Skip to content

Commit 834fea6

Browse files
committed
fix panic when a not present asset is called + upgrade all deps
Signed-off-by: Thomas Labarussias <[email protected]>
1 parent 4d9ffce commit 834fea6

File tree

382 files changed

+37758
-4380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

382 files changed

+37758
-4380
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
cabourotte
2-
dist/
2+
dist/
3+
config.yaml

go.mod

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,38 @@ go 1.23.5
44

55
require (
66
github.com/cespare/xxhash/v2 v2.3.0 // indirect
7-
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
7+
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
88
github.com/golang/protobuf v1.5.4 // indirect
99
github.com/labstack/gommon v0.4.2 // indirect
10-
github.com/mattn/go-colorable v0.1.13 // indirect
10+
github.com/mattn/go-colorable v0.1.14 // indirect
1111
github.com/pkg/errors v0.9.1
12-
github.com/prometheus/client_golang v1.17.0
13-
github.com/prometheus/common v0.45.0 // indirect
14-
github.com/prometheus/procfs v0.12.0 // indirect
12+
github.com/prometheus/client_golang v1.20.5
13+
github.com/prometheus/common v0.62.0 // indirect
14+
github.com/prometheus/procfs v0.15.1 // indirect
1515
github.com/riemann/riemann-go-client v0.5.0
1616
github.com/russross/blackfriday/v2 v2.1.0 // indirect
17-
github.com/urfave/cli/v2 v2.26.0
17+
github.com/urfave/cli/v2 v2.27.5
1818
github.com/valyala/fasttemplate v1.2.2 // indirect
1919
go.uber.org/multierr v1.11.0 // indirect
20-
go.uber.org/zap v1.26.0
21-
golang.org/x/crypto v0.31.0 // indirect
22-
golang.org/x/net v0.32.0 // indirect
23-
golang.org/x/sys v0.28.0 // indirect
24-
golang.org/x/text v0.21.0 // indirect
25-
google.golang.org/protobuf v1.35.2 // indirect
20+
go.uber.org/zap v1.27.0
21+
golang.org/x/crypto v0.33.0 // indirect
22+
golang.org/x/net v0.35.0 // indirect
23+
golang.org/x/sys v0.30.0 // indirect
24+
golang.org/x/text v0.22.0 // indirect
25+
google.golang.org/protobuf v1.36.5 // indirect
2626
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637
2727
gopkg.in/yaml.v2 v2.4.0
2828
)
2929

3030
require (
31-
github.com/labstack/echo/v4 v4.13.2
31+
github.com/labstack/echo/v4 v4.13.3
3232
github.com/mcorbin/corbierror v0.0.0-20220804210425-326e0b6f18e4
33-
go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho v0.58.0
34-
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.58.0
35-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0
36-
go.opentelemetry.io/otel v1.33.0
37-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.33.0
38-
go.opentelemetry.io/otel/sdk v1.33.0
33+
go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho v0.59.0
34+
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.59.0
35+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0
36+
go.opentelemetry.io/otel v1.34.0
37+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0
38+
go.opentelemetry.io/otel/sdk v1.34.0
3939
)
4040

4141
require (
@@ -45,19 +45,20 @@ require (
4545
github.com/go-logr/logr v1.4.2 // indirect
4646
github.com/go-logr/stdr v1.2.2 // indirect
4747
github.com/google/uuid v1.6.0 // indirect
48-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect
48+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 // indirect
49+
github.com/klauspost/compress v1.17.11 // indirect
4950
github.com/mattn/go-isatty v0.0.20 // indirect
50-
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
51-
github.com/prometheus/client_model v0.5.0 // indirect
51+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
52+
github.com/prometheus/client_model v0.6.1 // indirect
5253
github.com/valyala/bytebufferpool v1.0.0 // indirect
53-
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect
54+
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
5455
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
55-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect
56-
go.opentelemetry.io/otel/metric v1.33.0 // indirect
57-
go.opentelemetry.io/otel/trace v1.33.0 // indirect
58-
go.opentelemetry.io/proto/otlp v1.4.0 // indirect
59-
golang.org/x/time v0.8.0 // indirect
60-
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect
61-
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect
62-
google.golang.org/grpc v1.68.1 // indirect
56+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
57+
go.opentelemetry.io/otel/metric v1.34.0 // indirect
58+
go.opentelemetry.io/otel/trace v1.34.0 // indirect
59+
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
60+
golang.org/x/time v0.10.0 // indirect
61+
google.golang.org/genproto/googleapis/api v0.0.0-20250212204824-5a70512c5d8b // indirect
62+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250212204824-5a70512c5d8b // indirect
63+
google.golang.org/grpc v1.70.0 // indirect
6364
)

go.sum

Lines changed: 72 additions & 68 deletions
Large diffs are not rendered by default.

http/handler.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"io/fs"
99
"net/http"
1010
"reflect"
11-
"strings"
1211
"sync"
1312
"text/template"
1413
"time"
@@ -83,7 +82,7 @@ func (c *Component) oneOff(ec echo.Context, healthcheck healthcheck.Healthcheck)
8382
return ec.JSON(http.StatusCreated, newResponse(msg))
8483
}
8584

86-
func (c *Component) addCheckError(ec echo.Context, healthcheck healthcheck.Healthcheck, err error) error {
85+
func (c *Component) addCheckError(_ echo.Context, healthcheck healthcheck.Healthcheck, err error) error {
8786
msg := fmt.Sprintf("Fail to start the healthcheck %s: %s", healthcheck.Base().Name, err.Error())
8887
return corbierror.New(msg, corbierror.Internal, true)
8988
}
@@ -106,6 +105,7 @@ func (c *Component) handlers() {
106105
c.Server.Use(otelecho.Middleware("cabourotte"))
107106
c.Server.Use(c.metricMiddleware)
108107
fsys, _ := fs.Sub(embededFiles, "assets")
108+
assetHandler := http.FileServer(http.FS(fsys))
109109
if c.Config.BasicAuth.Username != "" {
110110
c.Server.Use(middleware.BasicAuth(func(username, password string, ctx echo.Context) (bool, error) {
111111
if subtle.ConstantTimeCompare([]byte(username),
@@ -311,8 +311,12 @@ func (c *Component) handlers() {
311311
err := ec.Redirect(http.StatusFound, "/frontend/index.html")
312312
return err
313313
})
314-
c.Server.GET("/frontend/*", func(ec echo.Context) error {
315-
path := strings.TrimPrefix(ec.Request().URL.Path, "/frontend/")
314+
c.Server.GET("/frontend/", func(ec echo.Context) error {
315+
err := ec.Redirect(http.StatusFound, "/frontend/index.html")
316+
return err
317+
})
318+
c.Server.GET("/frontend/index.html", func(ec echo.Context) error {
319+
path := "index.html"
316320

317321
if path == "" {
318322
path = "index.html"
@@ -359,8 +363,8 @@ func (c *Component) handlers() {
359363
} else {
360364
return ec.HTML(http.StatusOK, string(buffer))
361365
}
362-
363366
})
367+
c.Server.GET("/frontend/*", echo.WrapHandler(http.StripPrefix("/frontend/", assetHandler)))
364368
}
365369

366370
c.Server.GET("/health", func(ec echo.Context) error {

vendor/github.com/cpuguy83/go-md2man/v2/md2man/debug.go

Lines changed: 62 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)