Skip to content

Instantly share code, notes, and snippets.

@liampulles
Created July 9, 2022 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liampulles/faf45dcbc4ba1624cfe84f8f01efb5ba to your computer and use it in GitHub Desktop.
Save liampulles/faf45dcbc4ba1624cfe84f8f01efb5ba to your computer and use it in GitHub Desktop.
You don't need a dependency injection library
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