mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Add shorthands for --url, --user, --password and --insecure flags
This commit is contained in:
parent
44319f3655
commit
35a0d089cb
@ -40,10 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Changed
|
||||
- Single executable binary instead of a bash script. Project has been rewritten in Go language.
|
||||
- No external programs (bash, httpie, jq) dependency. The new executable binary is self-sufficient.
|
||||
- `-u` global flag renamed to `--user`.
|
||||
- `-p` global flag renamed to `--password`.
|
||||
- `-l` global flag renamed to `--url`.
|
||||
- `-s` global flag renamed to `--insecure`. It does not receive a value anymore, it is a boolean flag.
|
||||
- `-s` global flag renamed to `-i`. It does not receive a value anymore, it is a boolean flag.
|
||||
- `-v` global flag renamed to `-v, --verbose`. It does not receive a value anymore, it is a boolean flag.
|
||||
- `-d` global flag renamed to `-d, --debug`. It does not receive a value anymore, it is a boolean flag.
|
||||
- `-n` global flag moved as a parameter to the `stack deploy` command.
|
||||
|
@ -40,10 +40,10 @@ func init() {
|
||||
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.psu.yaml)")
|
||||
rootCmd.PersistentFlags().BoolP("verbose", "v", false, "verbose mode")
|
||||
rootCmd.PersistentFlags().BoolP("debug", "d", false, "debug mode")
|
||||
rootCmd.PersistentFlags().Bool("insecure", false, "skip Portainer SSL certificate verification")
|
||||
rootCmd.PersistentFlags().String("url", "", "Portainer url")
|
||||
rootCmd.PersistentFlags().String("user", "", "Portainer user")
|
||||
rootCmd.PersistentFlags().String("password", "", "Portainer password")
|
||||
rootCmd.PersistentFlags().BoolP("insecure", "i", false, "skip Portainer SSL certificate verification")
|
||||
rootCmd.PersistentFlags().StringP("url", "l", "", "Portainer url")
|
||||
rootCmd.PersistentFlags().StringP("user", "u", "", "Portainer user")
|
||||
rootCmd.PersistentFlags().StringP("password", "p", "", "Portainer password")
|
||||
rootCmd.PersistentFlags().DurationP("timeout", "t", 0, "waiting time before aborting (like 100ms, 30s, 1h20m)")
|
||||
viper.BindPFlag("config", rootCmd.PersistentFlags().Lookup("config"))
|
||||
viper.BindPFlag("verbose", rootCmd.PersistentFlags().Lookup("verbose"))
|
||||
|
Loading…
Reference in New Issue
Block a user