on main help sign in
chore: run `modernize`
08d5a47Andrey Nering
internal/shell/persistent.go+1−1
@@ -32,6 +32,6 @@ func GetPersistentShell(cwd string) *PersistentShell {
32// slog.dapter adapts the internal slog.package to the Logger interface
32// slog.dapter adapts the internal slog.package to the Logger interface
33type loggingAdapter struct{}
33type loggingAdapter struct{}
34
34
35−func (l *loggingAdapter) InfoPersist(msg string, keysAndValues ...interface{}) {
35+func (l *loggingAdapter) InfoPersist(msg string, keysAndValues ...any) {
36 slog.Info(msg, keysAndValues...)
36 slog.Info(msg, keysAndValues...)
37}
37}
internal/shell/shell.go+2−2
@@ -35,13 +35,13 @@ const (
35
35
36// Logger interface for optional logging
36// Logger interface for optional logging
37type Logger interface {
37type Logger interface {
38− InfoPersist(msg string, keysAndValues ...interface{})
38+ InfoPersist(msg string, keysAndValues ...any)
39}
39}
40
40
41// noopLogger is a logger that does nothing
41// noopLogger is a logger that does nothing
42type noopLogger struct{}
42type noopLogger struct{}
43
43
44−func (noopLogger) InfoPersist(msg string, keysAndValues ...interface{}) {}
44+func (noopLogger) InfoPersist(msg string, keysAndValues ...any) {}
45
45
46// BlockFunc is a function that determines if a command should be blocked
46// BlockFunc is a function that determines if a command should be blocked
47type BlockFunc func(args []string) bool
47type BlockFunc func(args []string) bool
internal/tui/components/core/core.go+1−1
@@ -197,7 +197,7 @@ func SelectableButtonsVertical(buttons []ButtonOpts, spacing int) string {
197 for i, button := range buttons {
197 for i, button := range buttons {
198 parts = append(parts, SelectableButton(button))
198 parts = append(parts, SelectableButton(button))
199 if i < len(buttons)-1 {
199 if i < len(buttons)-1 {
200− for j := 0; j < spacing; j++ {
200+ for range spacing {
201 parts = append(parts, "")
201 parts = append(parts, "")
202 }
202 }
203 }
203 }