refactor(auth): extract supported providers message as constant
Address review comment from @xiaket - the "Supported providers" message was printed in multiple places. Now extracted as a constant. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
dc9fb327c2
commit
ea447c6b68
1 changed files with 4 additions and 2 deletions
|
|
@ -17,6 +17,8 @@ import (
|
|||
"github.com/sipeed/picoclaw/pkg/providers"
|
||||
)
|
||||
|
||||
const supportedProvidersMsg = "Supported providers: openai, anthropic, google-antigravity"
|
||||
|
||||
func authCmd() {
|
||||
if len(os.Args) < 3 {
|
||||
authHelp()
|
||||
|
|
@ -78,7 +80,7 @@ func authLoginCmd() {
|
|||
|
||||
if provider == "" {
|
||||
fmt.Println("Error: --provider is required")
|
||||
fmt.Println("Supported providers: openai, anthropic, google-antigravity")
|
||||
fmt.Println(supportedProvidersMsg)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +93,7 @@ func authLoginCmd() {
|
|||
authLoginGoogleAntigravity()
|
||||
default:
|
||||
fmt.Printf("Unsupported provider: %s\n", provider)
|
||||
fmt.Println("Supported providers: openai, anthropic, google-antigravity")
|
||||
fmt.Println(supportedProvidersMsg)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue