-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmain.go
More file actions
32 lines (23 loc) · 711 Bytes
/
Copy pathmain.go
File metadata and controls
32 lines (23 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"fmt"
"os"
tea "github.com/charmbracelet/bubbletea"
"github.com/Achno/gocheat/config"
"github.com/Achno/gocheat/internal/ui"
cheatstyles "github.com/Achno/gocheat/styles"
)
func main() {
// Make sure the config file is created
config.Init()
// Make sure that the items are read from the config file
ui.InitItems()
// create the Screen where you view items
model := ui.InitItemScreen()
// Initialize all lipgloss styles based on the theme and accessed by 'Styles' variable
cheatstyles.InitializeStyles(cheatstyles.InitTheme())
if _, err := tea.NewProgram(model, tea.WithAltScreen()).Run(); err != nil {
fmt.Println("Error running program:", err)
os.Exit(1)
}
}