package main import ( "flag" "fmt" "os" "git.linuxforward.com/byom/byom-core-gateway/app" "git.linuxforward.com/byom/byom-core-gateway/config" ) func main() { cfgPath := flag.String("config", "config.yaml", "Path to the configuration file") flag.Parse() if *cfgPath == "" { fmt.Println("Config file not provided") os.Exit(1) } // Read the configuration file cfg, err := config.ReadConfig(*cfgPath) if err != nil { fmt.Println("Error reading the configuration file: ", err) os.Exit(1) } app, err := app.NewApp(cfg) if err != nil { fmt.Println("Error creating the app: ", err) return } err = app.Run() if err != nil { fmt.Println("Error running the app: ", err) os.Exit(1) } }