Files
lazyssh/cmd/main.go
T

32 lines
685 B
Go
Raw Normal View History

2025-08-14 11:51:07 +01:00
package main
import (
"fmt"
2025-08-17 11:09:20 +01:00
"github.com/Adembc/lazyssh/internal/adapters/data/memory"
"github.com/Adembc/lazyssh/internal/adapters/ui"
"github.com/Adembc/lazyssh/internal/core/services"
2025-08-14 11:51:07 +01:00
"github.com/spf13/cobra"
2025-08-17 11:09:20 +01:00
"os"
2025-08-14 11:51:07 +01:00
)
func main() {
2025-08-17 11:09:20 +01:00
serverInMemoryRepo := memory.NewServerRepository()
serverService := services.NewServerService(serverInMemoryRepo)
tui := ui.NewTUI(serverService)
2025-08-14 11:51:07 +01:00
rootCmd := &cobra.Command{
2025-08-17 11:09:20 +01:00
Use: ui.AppName,
2025-08-14 11:51:07 +01:00
Short: "Lazy SSH server picker TUI",
RunE: func(cmd *cobra.Command, args []string) error {
2025-08-17 11:09:20 +01:00
return tui.Run()
2025-08-14 11:51:07 +01:00
},
}
rootCmd.SilenceUsage = true
if err := rootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}