Created
July 9, 2022 18:02
-
-
Save liampulles/faf45dcbc4ba1624cfe84f8f01efb5ba to your computer and use it in GitHub Desktop.
You don't need a dependency injection library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
server := Wire() | |
server.Run() | |
} | |
func Wire() *http.Server { | |
cfgProvider := config.NewProvider() | |
svc := usecase.NewService(cfgProvider) | |
return http.NewServer(cfgProvider, svc) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment