From 05e74d0ffffba85df9483249c315d5b0af1dec77 Mon Sep 17 00:00:00 2001 From: labbs Date: Sat, 13 Mar 2021 18:22:44 +0100 Subject: [PATCH] add debug option --- pkg/config/config.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 8a3289f..5cc6497 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -10,7 +10,8 @@ var ( Organizations cli.StringSlice ApiUrl string } - Port int + Port int + Debug bool ) // InitConfiguration => set configuration from env vars or command parameters @@ -61,5 +62,11 @@ func InitConfiguration() []cli.Flag { Usage: "List all repositories you want get informations. Format /,/,/ (like test/test)", Destination: &Github.Repositories, }, + &cli.BoolFlag{ + Name: "debug_profile", + EnvVars: []string{"DEBUG_PROFILE"}, + Usage: "Expose pprof information on /debug/pprof/", + Destination: &Debug, + }, } }