Skip to content

refactor: add explicit defaults in reflect switch blocks - #362

Closed
tenthirtyam wants to merge 1 commit into
hashicorp:mainfrom
tenthirtyam:refactor/explicit-defaults-in-reflect-switch-
Closed

tenthirtyam wants to merge 1 commit into
hashicorp:mainfrom
tenthirtyam:refactor/explicit-defaults-in-reflect-switch-

Conversation

@tenthirtyam

Copy link
Copy Markdown
Contributor

Description

Add no-op default branches with clarifying comments in two reflection-based switch statements (structTypes and renderWalker.Exit). The compiler does not require exhaustive switches, but unlisted reflectwalk.Location and reflect.Kind values were left implicit.

This documents intentional handling for non-container kinds and keeps the switch logic explicit without changing behavior.

Rollback Plan

Revert commit.

Changes to Security Controls

None

@tenthirtyam
tenthirtyam requested a review from a team as a code owner September 9, 2026 14:52
Add no-op `default` branches with clarifying comments in two reflection-based switch statements (`structTypes` and `renderWalker.Exit`). The compiler does not require exhaustive switches, but unlisted
`reflectwalk.Location` and `reflect.Kind `values were left implicit.

This documents intentional handling for non-container kinds and keeps the switch logic explicit without changing behavior.

Signed-off-by: Ryan Johnson <ryan@tenthirtyam.org>
@tenthirtyam
tenthirtyam force-pushed the refactor/explicit-defaults-in-reflect-switch- branch from 712cc4a to 2e8c250 Compare November 12, 2026 00:34
@tenthirtyam

Copy link
Copy Markdown
Contributor Author

Superseded by the consolidated cleanup PR: #377. Closing this in favor of that PR per maintainer request.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant