aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-08-27 13:49:00 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-08-27 13:49:00 +0200
commit2e3833dd30fafdc270e8d80a78af9116571dc247 (patch)
tree8428eb9938b8cf5351ff6e7b78b2968cc37b2e27 /main.go
parentabbbf17bcfe6dfa663b7019c4892db09e27b3808 (diff)
Use subcommand args instead of flags for CLI
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
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