Revert "setting cli flags to proper commands (#860)" (#916)

This reverts commit 0fa3abbec0.
This commit is contained in:
Maycon Santos
2023-05-31 16:06:42 +02:00
committed by GitHub
parent e87647c853
commit 6425eb6732
9 changed files with 34 additions and 88 deletions

View File

@ -23,12 +23,6 @@ var (
host string
)
func init() {
sshCmd.PersistentFlags().StringVarP(&logLevel, "log-level", "l", "info", "sets Netbird log level")
sshCmd.PersistentFlags().IntVarP(&port, "port", "p", nbssh.DefaultSSHPort, "Sets remote SSH port. Defaults to "+fmt.Sprint(nbssh.DefaultSSHPort))
sshCmd.PersistentFlags().StringVarP(&configPath, "config", "c", defaultConfigPath, "Netbird config file location")
}
var sshCmd = &cobra.Command{
Use: "ssh",
Args: func(cmd *cobra.Command, args []string) error {
@ -120,3 +114,7 @@ func runSSH(ctx context.Context, addr string, pemKey []byte, cmd *cobra.Command)
return nil
}
func init() {
sshCmd.PersistentFlags().IntVarP(&port, "port", "p", nbssh.DefaultSSHPort, "Sets remote SSH port. Defaults to "+fmt.Sprint(nbssh.DefaultSSHPort))
}