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
I have verified this does not duplicate an existing issue
The text was updated successfully, but these errors were encountered:
TimShi
changed the title
code gen should generate controller constructor that returns concrent type instead of interface
code gen should generate controller constructor that returns concret type instead of interface
Jun 28, 2024
Description
Expected Behavior
It should generate constructor that returns the concrete type that implements this interface
func NewExampleFriendsController(r *repository.FriendsRepository) *ExampleFriendsController {
Actual Behavior
Currently, code gen generates controller constructor that returns
web.Controller
interface.func NewExampleFriendsController(di exampleFriendsControllerDI) web.Controller {
This makes it hard to inject this specific controller instance into test if there are multiple controllers in the test.
Affected Version
v0.14.0
Steps to Reproduce
Follow the README in examples/database to generate the service based on contract.
Checklist
The text was updated successfully, but these errors were encountered: