From 4d37d2bc0893036d1999f52da3e52f31c3a77d07 Mon Sep 17 00:00:00 2001 From: Jon Kochanik Date: Thu, 15 Jul 2021 13:35:36 -0400 Subject: [PATCH] simplified execute --- zssh/zscp/main.go | 6 +----- zssh/zssh/main.go | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/zssh/zscp/main.go b/zssh/zscp/main.go index 47bb363..17f10f0 100644 --- a/zssh/zscp/main.go +++ b/zssh/zscp/main.go @@ -211,10 +211,6 @@ func init() { rootCmd.Flags().StringVarP(&serviceName, "service", "s", ExpectedServiceAndExeName, fmt.Sprintf("service name. default: %s", ExpectedServiceAndExeName)) } -func Execute() error { - return rootCmd.Execute() -} - func getConfig(cfgFile string) (zitiCfg *config.Config) { zitiCfg, err := config.NewFromFile(cfgFile) if err != nil { @@ -237,5 +233,5 @@ func after(value string, a string) string { } func main() { - Execute() + _ = rootCmd.Execute() } diff --git a/zssh/zssh/main.go b/zssh/zssh/main.go index bd73533..9fa99d8 100644 --- a/zssh/zssh/main.go +++ b/zssh/zssh/main.go @@ -106,10 +106,6 @@ func init() { rootCmd.Flags().BoolVarP(&debug, "debug", "d", false, "pass to enable additional debug information") } -func Execute() error { - return rootCmd.Execute() -} - func getConfig(cfgFile string) (zitiCfg *config.Config) { zitiCfg, err := config.NewFromFile(cfgFile) if err != nil { @@ -119,5 +115,5 @@ func getConfig(cfgFile string) (zitiCfg *config.Config) { } func main() { - Execute() + _ = rootCmd.Execute() }