diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-27 13:49:00 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-27 13:49:00 +0200 |
| commit | 2e3833dd30fafdc270e8d80a78af9116571dc247 (patch) | |
| tree | 8428eb9938b8cf5351ff6e7b78b2968cc37b2e27 /main.go | |
| parent | abbbf17bcfe6dfa663b7019c4892db09e27b3808 (diff) | |
Use subcommand args instead of flags for CLI
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |
