Skip to content

Commit

Permalink
refactor(autok3s): create and join flag refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
NewGr8Player authored and rancher-sy-bot committed Aug 31, 2020
1 parent 1dee8c1 commit ccb2608
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ func init() {
createCmd.Flags().StringVarP(&cProvider, "provider", "p", cProvider, "Provider is a module which provides an interface for managing cloud resources")
createCmd.Flags().StringVar(&cSSH.User, "ssh-user", cSSH.User, "SSH user for host")
createCmd.Flags().StringVar(&cSSH.Port, "ssh-port", cSSH.Port, "SSH port for host")
createCmd.Flags().StringVar(&cSSH.SSHKey, "ssh-key", cSSH.SSHKey, "SSH private key path")
createCmd.Flags().StringVar(&cSSH.SSHKeyPath, "ssh-key-path", cSSH.SSHKeyPath, "SSH private key path")
createCmd.Flags().StringVar(&cSSH.SSHKeyPassphrase, "ssh-key-pass", cSSH.SSHKeyPassphrase, "Passphrase of SSH private key")
createCmd.Flags().StringVar(&cSSH.SSHCertPath, "ssh-key-cert-path", cSSH.SSHCertPath, "SSH private key certificate path")
createCmd.Flags().StringVar(&cSSH.Password, "ssh-password", cSSH.Password, "SSH login password")
}

func CreateCommand() *cobra.Command {
Expand Down
5 changes: 4 additions & 1 deletion cmd/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ func init() {
joinCmd.Flags().StringVarP(&jProvider, "provider", "p", jProvider, "Provider is a module which provides an interface for managing cloud resources")
joinCmd.Flags().StringVar(&jSSH.User, "ssh-user", jSSH.User, "SSH user for host")
joinCmd.Flags().StringVar(&jSSH.Port, "ssh-port", jSSH.Port, "SSH port for host")
joinCmd.Flags().StringVar(&jSSH.SSHKey, "ssh-key", jSSH.SSHKey, "SSH private key path")
joinCmd.Flags().StringVar(&jSSH.SSHKeyPath, "ssh-key-path", jSSH.SSHKeyPath, "SSH private key path")
joinCmd.Flags().StringVar(&jSSH.SSHKeyPassphrase, "ssh-key-pass", jSSH.SSHKeyPassphrase, "Passphrase of SSH private key")
joinCmd.Flags().StringVar(&jSSH.SSHCertPath, "ssh-key-cert-path", jSSH.SSHCertPath, "SSH private key certificate path")
joinCmd.Flags().StringVar(&jSSH.Password, "ssh-password", jSSH.Password, "SSH login password")
}

func JoinCommand() *cobra.Command {
Expand Down

0 comments on commit ccb2608

Please # to comment.