Revert preshared-key shorthand flag (#671)

This prevents conflict with the
 ssh command shorthand flag

add some init tests
This commit is contained in:
Maycon Santos
2023-02-06 10:35:37 +01:00
committed by GitHub
parent 3ec8274b8e
commit b5217350cf
2 changed files with 37 additions and 1 deletions

View File

@ -93,7 +93,7 @@ func init() {
rootCmd.PersistentFlags().StringVarP(&logLevel, "log-level", "l", "info", "sets Netbird log level")
rootCmd.PersistentFlags().StringVar(&logFile, "log-file", defaultLogFile, "sets Netbird log path. If console is specified the the log will be output to stdout")
rootCmd.PersistentFlags().StringVarP(&setupKey, "setup-key", "k", "", "Setup key obtained from the Management Service Dashboard (used to register peer)")
rootCmd.PersistentFlags().StringVarP(&preSharedKey, "preshared-key", "p", "", "Sets Wireguard PreSharedKey property. If set, then only peers that have the same key can communicate.")
rootCmd.PersistentFlags().StringVar(&preSharedKey, "preshared-key", "", "Sets Wireguard PreSharedKey property. If set, then only peers that have the same key can communicate.")
rootCmd.AddCommand(serviceCmd)
rootCmd.AddCommand(upCmd)
rootCmd.AddCommand(downCmd)