From cb7368cf7f7854cc5daafcd27b126eb362efcfea Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Wed, 16 Aug 2023 14:16:40 -0400 Subject: [PATCH] Trier `data []Buckets` avant de render `/documentation` --- cmd/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/server.go b/cmd/server.go index 84a2b25..e37b48f 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -8,6 +8,7 @@ import ( "encoding/json" "fmt" "log" + "sort" "embed" "html/template" @@ -351,6 +352,8 @@ func handleDocumentation(c echo.Context) error { }) } + sort.SliceStable(data, func(i, j int) bool { return data[i].Name < data[j].Name }) + return c.Render(http.StatusOK, "documentation-html", data) } -- 2.45.2