mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-18 20:30:51 +08:00
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:
@@ -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!")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user