refactor(auth): replace log calls with fmt for improved consistency and standard output usage

- Updated all authentication commands to use `fmt` instead of `log` for errors, info, and success messages.
- Ensured message formatting aligns across commands for consistent user experience.
This commit is contained in:
Luis Pater
2025-09-25 08:17:56 +08:00
parent 2724630430
commit e3be548e8d
5 changed files with 21 additions and 18 deletions

View File

@@ -3,6 +3,7 @@ package cmd
import (
"context"
"errors"
"fmt"
"os"
"github.com/router-for-me/CLIProxyAPI/v6/internal/auth/claude"
@@ -41,13 +42,13 @@ func DoClaudeLogin(cfg *config.Config, options *LoginOptions) {
}
return
}
log.Fatalf("Claude authentication failed: %v", err)
fmt.Printf("Claude authentication failed: %v\n", err)
return
}
if savedPath != "" {
log.Infof("Authentication saved to %s", savedPath)
fmt.Printf("Authentication saved to %s\n", savedPath)
}
log.Info("Claude authentication successful!")
fmt.Println("Claude authentication successful!")
}