INNER CODE UNIT · Go
main
ClickDevTech/CELERITY-panel · cc-agent/main.go:20
func main() {
configPath := flag.String("config", "/etc/cc-agent/config.json", "Path to config file")
showVersion := flag.Bool("version", false, "Print version and exit")
flag.Parse()
if *showVersion {
log.Printf("cc-agent %s", Version)
os.Exit(0)
}
cfg, err := LoadConfig(*configPath)
if err != nil {
log.Fatalf("[main] Failed to load config: %v", err)
}
userStore := NewUserStore(cfg)
if err := userStore.Load(); err != nil {
log.Printf("[main] Warning: could not load users from disk: %v", err)