style(cursor): replace fmt.Print* with log package for consistent logging

Address Gemini Code Assist review feedback: use logrus log package
instead of fmt.Printf/Println in Cursor auth handlers and CLI for
unified log formatting and level control.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
MrHuangJser
2026-03-26 17:03:32 +08:00
parent de5fe71478
commit 8902e1cccb
3 changed files with 12 additions and 13 deletions

View File

@@ -2,7 +2,6 @@ package cmd
import (
"context"
"fmt"
"github.com/router-for-me/CLIProxyAPI/v6/internal/config"
sdkAuth "github.com/router-for-me/CLIProxyAPI/v6/sdk/auth"
@@ -29,10 +28,10 @@ func DoCursorLogin(cfg *config.Config, options *LoginOptions) {
}
if savedPath != "" {
fmt.Printf("Authentication saved to %s\n", savedPath)
log.Infof("Authentication saved to %s", savedPath)
}
if record != nil && record.Label != "" {
fmt.Printf("Authenticated as %s\n", record.Label)
log.Infof("Authenticated as %s", record.Label)
}
fmt.Println("Cursor authentication successful!")
log.Info("Cursor authentication successful!")
}