From a41547f121897e6b9648488ef696cab28d6609fc Mon Sep 17 00:00:00 2001 From: boyce Date: Mon, 28 Jun 2021 16:58:32 +0800 Subject: [PATCH] =?UTF-8?q?console=E4=B8=AD=E6=96=B0=E5=A2=9E=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=90=AF=E5=8A=A8=E5=91=BD=E4=BB=A4=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- console/command.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/console/command.go b/console/command.go index b256474..dad0332 100644 --- a/console/command.go +++ b/console/command.go @@ -89,3 +89,22 @@ func PrintDefaults(){ fmt.Fprintf(os.Stderr, " -%-10s%10s\n",val.name,val.usage) } } + +func GetParamStringVal(paramName string) string{ + for _,cmd := range commandList { + if cmd.name == paramName{ + return cmd.strValue + } + } + return "" +} + +func GetParamBoolVal(paramName string) bool { + for _,cmd := range commandList { + if cmd.name == paramName{ + return cmd.bValue + } + } + + return false +} \ No newline at end of file