Skip to content

Add AsType generic wrapper over As - #1296

Closed
AzazelSensei wants to merge 1 commit into
uber-go:masterfrom
AzazelSensei:feat/1285-astype
Closed

Add AsType generic wrapper over As#1296
AzazelSensei wants to merge 1 commit into
uber-go:masterfrom
AzazelSensei:feat/1285-astype

Conversation

@AzazelSensei

Copy link
Copy Markdown

Same shape as errors.AsType versus errors.As.

fx.Annotate(newAsStringer, fx.AsType[fmt.Stringer]())

is As(new(fmt.Stringer)). I added a table case next to the existing As test.

Fixes #1285

Same shape as errors.AsType versus errors.As.

Fixes uber-go#1285
@CLAassistant

CLAassistant commented Aug 13, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@AzazelSensei

Copy link
Copy Markdown
Author

Closing. Unwatched inbox. I'm done waiting on this one.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Feature: fx.AsType[T] as generic wrapper over fx.As(new(T))

2 participants