From 2e3833dd30fafdc270e8d80a78af9116571dc247 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Thu, 27 Aug 2026 13:49:00 +0200 Subject: Use subcommand args instead of flags for CLI --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 8971433..397b3d6 100644 --- a/main.go +++ b/main.go @@ -13,7 +13,8 @@ import ( ) var ( - configFile = flag.String("config", "config.yaml", "path to the YAML configuration file") + configFile = flag.String("config", "config.yaml", "path to the YAML configuration file") + enablePprof = flag.Bool("pprof", false, "expose pprof endpoints at /debug/pprof") ) func main() { @@ -30,7 +31,7 @@ func main() { db, err := sql.Open("sqlite3", appConfig.Database.Path) kcore.Expect(err, "failed to open database") defer db.Close() - cli.Run(db, *configFile, appConfig) + cli.Run(db, *configFile, appConfig, flag.Args(), *enablePprof) } // startPyroscope starts the continuous profiler when enabled in the config and -- cgit v1.3