Skip to content

Commit

Permalink
simplified execute
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Kochanik committed Jul 15, 2021
1 parent 3139b4d commit 4d37d2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions zssh/zscp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -237,5 +233,5 @@ func after(value string, a string) string {
}

func main() {
Execute()
_ = rootCmd.Execute()
}
6 changes: 1 addition & 5 deletions zssh/zssh/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -119,5 +115,5 @@ func getConfig(cfgFile string) (zitiCfg *config.Config) {
}

func main() {
Execute()
_ = rootCmd.Execute()
}

0 comments on commit 4d37d2b

Please sign in to comment.