Go: refactor CLI (#15898)

### What problem does this PR solve?

1. remove unused code
2. fix login issue

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] Refactoring

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-06-10 16:06:30 +08:00
committed by GitHub
parent 357cb84cd4
commit 139f4515e8
5 changed files with 97 additions and 318 deletions

View File

@@ -46,7 +46,7 @@ func (c *CLI) LoginUserByCommand(cmd *Command) (ResponseIf, error) {
var result SimpleResponse
result.Code = 0
result.SetOutputFormat(c.outputFormat)
result.SetOutputFormat(c.Config.OutputFormat)
result.Message = "Login successful"
return &result, nil
@@ -78,7 +78,7 @@ func (c *CLI) LoginUserInteractive(email, password string) error {
return err
}
fmt.Printf("Login user %s successfully\n", email)
fmt.Printf("Login successfully\n")
switch c.Config.CLIMode {
case AdminMode: