Skip to content
This repository was archived by the owner on Oct 9, 2026. It is now read-only.

Refine Fallback Defaults and Startup Config Logging - #3

Merged
jmnote merged 1 commit into
mainfrom
2-day-2
May 6, 2026
Merged

jmnote merged 1 commit into
mainfrom
2-day-2

Conversation

@jmnote

@jmnote jmnote commented May 6, 2026

Copy link
Copy Markdown
Contributor

Refine Fallback Defaults and Startup Config Logging

@jmnote jmnote linked an issue May 6, 2026 that may be closed by this pull request
Closed
@jmnote
jmnote merged commit 677377c into main May 6, 2026
3 checks passed
@jmnote
jmnote deleted the 2-day-2 branch May 6, 2026 14:50

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces configuration logging at startup, featuring a new RedactedYAML function to mask sensitive API keys. It also refactors the MaxFallbacks configuration to use a pointer type for better default value management. Feedback was provided to ensure that potential errors when closing the YAML encoder are properly handled.

I am having trouble creating individual review comments. Click here to see my feedback.

internal/config/config.go (126-127)

medium

The error from enc.Close() is currently ignored. While yaml.Encoder.Close() is unlikely to fail when writing to a bytes.Buffer, it is best practice to handle it to ensure all data is flushed correctly and to catch any unexpected issues during the finalization of the YAML document.

err = enc.Encode(&redacted)
	if closeErr := enc.Close(); closeErr != nil && err == nil {
		err = closeErr
	}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

day 2

1 participant