Skip to content

Commit

Permalink
refactor: remove confusing arg in AsNamed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrthinger authored and samber committed Dec 31, 2023
1 parent d7f2efa commit c635315
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion di_alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func AsNamed[Initial any, Alias any](i Injector, initial string, alias string) e
return fmt.Errorf("DI: service `%s` has not been declared", initial)
}

provide(i, alias, 42, func(_ string, _ int) Service[Alias] {
provide(i, alias, nil, func(_ string, _ any) Service[Alias] {
return newServiceAlias[Initial, Alias](alias, i, initial)
})

Expand Down

0 comments on commit c635315

Please sign in to comment.