Skip to content

refactor: use reflect.TypeFor for type comparisons#346

Open
tenthirtyam wants to merge 1 commit into
hashicorp:mainfrom
tenthirtyam:refactor/type-comparisons
Open

refactor: use reflect.TypeFor for type comparisons#346
tenthirtyam wants to merge 1 commit into
hashicorp:mainfrom
tenthirtyam:refactor/type-comparisons

Conversation

@tenthirtyam

Copy link
Copy Markdown

Description

Replace runtime sample values with direct generic type lookup.

Resolved Issues

In Go 1.22 and later, reflect.TypeFor[T]() returns the same reflect.Type without requiring a runtime value.

Rollback Plan

Revert commit.

Changes to Security Controls

None.

Replace runtime sample values with direct generic type lookup.

In Go 1.22 and later, `reflect.TypeFor[T]()` returns the same `reflect.Type` without requiring a runtime value.

Signed-off-by: Ryan Johnson <ryan@tenthirtyam.org>
@tenthirtyam
tenthirtyam requested a review from a team as a code owner July 24, 2026 03:54
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