chore: run `modernize`

Andrey Nering created

Change summary

internal/shell/persistent.go         | 2 +-
internal/shell/shell.go              | 4 ++--
internal/tui/components/core/core.go | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)

Detailed changes

internal/shell/persistent.go 🔗

@@ -32,6 +32,6 @@ func GetPersistentShell(cwd string) *PersistentShell {
 // slog.dapter adapts the internal slog.package to the Logger interface
 type loggingAdapter struct{}
 
-func (l *loggingAdapter) InfoPersist(msg string, keysAndValues ...interface{}) {
+func (l *loggingAdapter) InfoPersist(msg string, keysAndValues ...any) {
 	slog.Info(msg, keysAndValues...)
 }

internal/shell/shell.go 🔗

@@ -35,13 +35,13 @@ const (
 
 // Logger interface for optional logging
 type Logger interface {
-	InfoPersist(msg string, keysAndValues ...interface{})
+	InfoPersist(msg string, keysAndValues ...any)
 }
 
 // noopLogger is a logger that does nothing
 type noopLogger struct{}
 
-func (noopLogger) InfoPersist(msg string, keysAndValues ...interface{}) {}
+func (noopLogger) InfoPersist(msg string, keysAndValues ...any) {}
 
 // BlockFunc is a function that determines if a command should be blocked
 type BlockFunc func(args []string) bool

internal/tui/components/core/core.go 🔗

@@ -197,7 +197,7 @@ func SelectableButtonsVertical(buttons []ButtonOpts, spacing int) string {
 	for i, button := range buttons {
 		parts = append(parts, SelectableButton(button))
 		if i < len(buttons)-1 {
-			for j := 0; j < spacing; j++ {
+			for range spacing {
 				parts = append(parts, "")
 			}
 		}