working commit

This commit is contained in:
2026-06-08 09:42:32 +02:00
parent 0506b35cd1
commit 5f16f33a8b
21 changed files with 786 additions and 114 deletions
+2 -6
View File
@@ -13,10 +13,6 @@ import (
"github.com/spf13/viper"
)
const (
defaultHostname = "localhost:1025"
)
type Util struct {
oper *operator.Operator
subCmd *cobra.Command
@@ -84,8 +80,8 @@ func (util *Util) BuildCmds() *cobra.Command {
Args: cobra.ExactArgs(1),
Run: util.UpdateAccount,
}
updateAccountsCmd.Flags().StringVarP(&util.updateAccountParams.Password, "newpass", "N", util.updateAccountParams.Password, "New password")
updateAccountsCmd.Flags().StringVarP(&util.updateAccountParams.Username, "newname", "M", util.updateAccountParams.Username, "New username")
updateAccountsCmd.Flags().StringVarP(&util.updateAccountParams.NewPassword, "newpass", "N", util.updateAccountParams.NewPassword, "New password")
updateAccountsCmd.Flags().StringVarP(&util.updateAccountParams.NewUsername, "newname", "M", util.updateAccountParams.NewUsername, "New username")
updateAccountsCmd.MarkFlagsOneRequired("newpass", "newname")
subCmd.AddCommand(updateAccountsCmd)