-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
30 lines (25 loc) · 668 Bytes
/
Copy pathmain.go
File metadata and controls
30 lines (25 loc) · 668 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
package main
import (
"os"
"github.com/oliashish/vofo/cmd"
"github.com/oliashish/vofo/logger"
)
// main initializes the application and handles CLI execution.
func main() {
// Initialize logger
log, err := logger.NewLogger()
if err != nil {
// Print to stderr since logger failed
_, _ = os.Stderr.WriteString("Failed to initialize logger: " + err.Error() + "\n")
os.Exit(1)
}
// Set up logger for debug and info
log.Debug("Setting up Vofo agent...")
log.Info("Vofo agent starting...")
// Initialize and execute CLI commands
cmd.Init()
if err := cmd.Execute(); err != nil {
log.Error("Failed to execute CLI: " + err.Error())
os.Exit(1)
}
}