Skip to content

Commit a3926fd

Browse files
Fix staticcheck: lowercase error strings per Go conventions
Go style guide requires error strings to not be capitalized (they may be wrapped by other errors).
1 parent f811e45 commit a3926fd

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

cmd/mcp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func runMCP(cmd *cobra.Command, args []string) error {
166166
switch backend {
167167
case "pinecone":
168168
if apiKey == "" {
169-
return fmt.Errorf("Pinecone API key required (--api-key or PINECONE_API_KEY)")
169+
return fmt.Errorf("pinecone API key required (--api-key or PINECONE_API_KEY)")
170170
}
171171
ret, err = pcretriever.NewClient(ctx, pcretriever.Config{
172172
Config: retriever.Config{
@@ -178,7 +178,7 @@ func runMCP(cmd *cobra.Command, args []string) error {
178178

179179
case "qdrant":
180180
if dbHost == "" {
181-
return fmt.Errorf("Qdrant host required (--db-host)")
181+
return fmt.Errorf("qdrant host required (--db-host)")
182182
}
183183
ret, err = qdretriever.NewClient(ctx, qdretriever.Config{
184184
Config: retriever.Config{

cmd/query.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func runQuery(cmd *cobra.Command, args []string) error {
9696
return fmt.Errorf("index name required (--index)")
9797
}
9898
if openaiKey == "" {
99-
return fmt.Errorf("OpenAI API key required for text queries (--openai-key or OPENAI_API_KEY)")
99+
return fmt.Errorf("openai API key required for text queries (--openai-key or OPENAI_API_KEY)")
100100
}
101101

102102
// Setup context with cancellation
@@ -118,7 +118,7 @@ func runQuery(cmd *cobra.Command, args []string) error {
118118
switch backend {
119119
case "pinecone":
120120
if apiKey == "" {
121-
return fmt.Errorf("Pinecone API key required")
121+
return fmt.Errorf("pinecone API key required")
122122
}
123123
ret, err = pcretriever.NewClient(ctx, pcretriever.Config{
124124
Config: retriever.Config{
@@ -130,7 +130,7 @@ func runQuery(cmd *cobra.Command, args []string) error {
130130

131131
case "qdrant":
132132
if dbHost == "" {
133-
return fmt.Errorf("Qdrant host required (--db-host)")
133+
return fmt.Errorf("qdrant host required (--db-host)")
134134
}
135135
ret, err = qdretriever.NewClient(ctx, qdretriever.Config{
136136
Config: retriever.Config{

cmd/serve.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func runServe(cmd *cobra.Command, args []string) error {
150150
switch backend {
151151
case "pinecone":
152152
if apiKey == "" {
153-
return fmt.Errorf("Pinecone API key required (--api-key or PINECONE_API_KEY)")
153+
return fmt.Errorf("pinecone API key required (--api-key or PINECONE_API_KEY)")
154154
}
155155
if index == "" {
156156
return fmt.Errorf("index name required (--index)")
@@ -165,7 +165,7 @@ func runServe(cmd *cobra.Command, args []string) error {
165165

166166
case "qdrant":
167167
if dbHost == "" {
168-
return fmt.Errorf("Qdrant host required (--db-host)")
168+
return fmt.Errorf("qdrant host required (--db-host)")
169169
}
170170
if index == "" {
171171
return fmt.Errorf("collection name required (--index)")

cmd/sync.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ func runSync(cmd *cobra.Command, args []string) error {
7878
apiKey = os.Getenv("PINECONE_API_KEY")
7979
}
8080
if apiKey == "" {
81-
return fmt.Errorf("Pinecone API key is required. Set PINECONE_API_KEY or use --api-key")
81+
return fmt.Errorf("pinecone API key is required: set PINECONE_API_KEY or use --api-key")
8282
}
8383

8484
// Resolve index from env if not provided
8585
if indexName == "" {
8686
indexName = viper.GetString("index")
8787
}
8888
if indexName == "" {
89-
return fmt.Errorf("Pinecone index name is required. Use --index flag")
89+
return fmt.Errorf("pinecone index name is required: use --index flag")
9090
}
9191

9292
// Setup context with cancellation

0 commit comments

Comments
 (0)