diff --git a/internal/app/app.go b/internal/app/app.go index b20d4fd..a1239f8 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -15,13 +15,25 @@ type App struct { } // AppState represents the current state of the application -type AppState string +type AppState int const ( - StateRunning AppState = "running" - StatePaused AppState = "paused" + StatePaused AppState = iota + StateRunning ) +// String returns the string representation of the AppState +func (s AppState) String() string { + switch s { + case StatePaused: + return "paused" + case StateRunning: + return "running" + default: + return "unknown" + } +} + // NewApp creates a new application instance func NewApp(logger *slog.Logger) *App { return &App{