Run modernise on the project

This will be available in "go fix" within Go 1.26 but in the meantime:

go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
This commit is contained in:
Jacalz
2025-09-17 22:28:16 +02:00
parent ee742cf34e
commit 534a7bfaaf
15 changed files with 26 additions and 38 deletions
+1 -4
View File
@@ -106,10 +106,7 @@ func (s *SettingsDialog) createGeneralTab(canSaveQueueToServer bool) *container.
startupPage = widget.NewSelect(pages, func(_ string) {
s.config.Application.StartupPage = backend.SupportedStartupPages[startupPage.SelectedIndex()]
})
initialIdx := slices.Index(backend.SupportedStartupPages, s.config.Application.StartupPage)
if initialIdx < 0 {
initialIdx = 0
}
initialIdx := max(slices.Index(backend.SupportedStartupPages, s.config.Application.StartupPage), 0)
startupPage.SetSelectedIndex(initialIdx)
if startupPage.Selected == "" {
startupPage.SetSelectedIndex(0)