From 65b1fa040f71d6ae103866a1379b129d50ba568d Mon Sep 17 00:00:00 2001 From: surdeus Date: Wed, 28 Jun 2023 14:07:07 +0300 Subject: [PATCH] Parse now returns parsed arguments to make code shorter. --- src/mtool/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mtool/main.go b/src/mtool/main.go index a00bf6a..a0fc154 100644 --- a/src/mtool/main.go +++ b/src/mtool/main.go @@ -25,9 +25,10 @@ type Tool struct { type Tools map[string] Tool -func (flags *Flags) Parse() { +func (flags *Flags) Parse() []string { flags.FlagSet.Parse(flags.args) flags.parsedArgs = flags.FlagSet.Args() + return flags.parsedArgs } func (flags *Flags) AllArgs() []string {