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
+2 -2
View File
@@ -45,7 +45,7 @@ func NewStarRating() *StarRating {
func (s *StarRating) createContainer() {
s.container = container.New(layout.NewCustomPaddedHBoxLayout(0))
var im *canvas.Image
for i := 0; i < 5; i++ {
for i := range 5 {
if s.IsDisabled {
im = canvas.NewImageFromResource(themedDisabledStarOutline)
} else if s.Rating > i {
@@ -126,7 +126,7 @@ func (s *StarRating) Refresh() {
if !s.holdRating && s.mouseHoverRating > 0 {
rating = s.mouseHoverRating
}
for i := 0; i < 5; i++ {
for i := range 5 {
im := s.container.Objects[i].(*canvas.Image)
im.SetMinSize(fyne.NewSize(s.StarSize, s.StarSize))
if s.IsDisabled {