From ced051a7e7ac5c298fcf73018d0d619defeeae34 Mon Sep 17 00:00:00 2001 From: ADITYA MISHRA <75035219+DEVLOPRR@users.noreply.github.com> Date: Tue, 22 Mar 2022 17:59:40 +0530 Subject: [PATCH] Added Debug Flag --- src/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.go b/src/main.go index 823b44d..8336bc7 100644 --- a/src/main.go +++ b/src/main.go @@ -17,6 +17,7 @@ var cli struct { Search commands.SearchCmd `cmd:"" help:"Search for appliation from appimage list."` Clean commands.CleanCmd `cmd:"" help:"Clean all the cache."` Version VersionFlag `name:"version" help:"Print version information and quit"` + Debug bool `help:"Show extra information for debugging."` } func (v VersionFlag) BeforeApply(app *kong.Kong, vars kong.Vars) error { @@ -35,9 +36,9 @@ func main() { Compact: true, }), kong.Vars{ - "VERSION": "0.4.1", + "VERSION": "0.4.2", }) // Call the Run() method of the selected parsed command. - err := ctx.Run() + err := ctx.Run(cli.Debug) ctx.FatalIfErrorf(err) }