mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
chore: run modernize
This commit is contained in:
@@ -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...)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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, "")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user