chore: run modernize

This commit is contained in:
Andrey Nering
2025-07-21 10:51:45 -03:00
parent 89e31227f9
commit 08d5a47c7d
3 changed files with 4 additions and 4 deletions

View File

@@ -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...)
}

View File

@@ -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

View File

@@ -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, "")
}
}