You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refactor: normalize config values at the config layer #767
Currently, config value normalization (e.g., strings.ToLower for SHA256 hashes) happens at each call site when retrieving values. This leads to repetitive normalization calls scattered throughout the codebase.
Current Pattern
// In getExpectedSHA256ifhash:=cfg.Get("BAZELISK_VERIFY_SHA256_"+suffix); hash!="" {
returnstrings.ToLower(hash)
}
Similar patterns exist in other places like getBazeliskHome with strings.ToUpper.
Proposed Improvement
Normalize values once at the config layer (when storing/loading), so all consumers can assume values are already in the expected format.
This would:
Reduce code duplication
Prevent bugs from forgotten normalization
Make the codebase cleaner
Related
This was identified while working on #766 (platform-specific SHA256 verification).
Activity