Skip to content

Commit cb59dc4

Browse files
grokifyclaude
andcommitted
Remove unused error return from loadSecureCredentials
The function always returned nil since missing credentials are intentionally skipped (they're optional). Fixes unparam lint error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8f4cf5b commit cb59dc4

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

config/secure.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,14 @@ func LoadSecureConfig(ctx context.Context, opts ...SecureConfigOption) (*SecureC
4343
}
4444

4545
// Load sensitive credentials from secure vault
46-
if err := sc.loadSecureCredentials(ctx); err != nil {
47-
_ = sv.Close()
48-
return nil, err
49-
}
46+
sc.loadSecureCredentials(ctx)
5047

5148
return sc, nil
5249
}
5350

5451
// loadSecureCredentials loads API keys from the secure vault.
55-
func (sc *SecureConfig) loadSecureCredentials(ctx context.Context) error {
52+
// Missing credentials are silently skipped as they are optional.
53+
func (sc *SecureConfig) loadSecureCredentials(ctx context.Context) {
5654
// Load LLM API key if not set
5755
if sc.LLMAPIKey == "" {
5856
key, err := sc.GetCredential(ctx, "LLM_API_KEY")
@@ -118,8 +116,6 @@ func (sc *SecureConfig) loadSecureCredentials(ctx context.Context) error {
118116
sc.LLMAPIKey = sc.XAIAPIKey
119117
}
120118
}
121-
122-
return nil
123119
}
124120

125121
// GetCredential retrieves a credential from the secure vault.

0 commit comments

Comments
 (0)