From fc7e395e66b3a8d43f8af83e5929dc2b91d92828 Mon Sep 17 00:00:00 2001 From: Stavros Date: Fri, 10 Oct 2025 17:16:22 +0300 Subject: [PATCH] feat: sort configured providers based on name length --- internal/bootstrap/app_bootstrap.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/bootstrap/app_bootstrap.go b/internal/bootstrap/app_bootstrap.go index a757a2e..606dd0b 100644 --- a/internal/bootstrap/app_bootstrap.go +++ b/internal/bootstrap/app_bootstrap.go @@ -7,6 +7,7 @@ import ( "net/http" "net/url" "os" + "sort" "strings" "time" "tinyauth/internal/config" @@ -157,6 +158,10 @@ func (app *BootstrapApp) Setup() error { }) } + sort.Slice(configuredProviders, func(i, j int) bool { + return configuredProviders[i].Name < configuredProviders[j].Name + }) + if authService.UserAuthConfigured() || ldapService != nil { configuredProviders = append(configuredProviders, controller.Provider{ Name: "Username",