|9 days ago||about 2 months ago|
|MIT License||MIT License|
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Implementing Graceful Shutdown in Golang
2 projects | reddit.com/r/golang | 17 Nov 2021
[Question] How to split main.go into separate packages/files whilst maintaining Dependency Injection?
8 projects | reddit.com/r/golang | 26 Aug 2021
Try fx https://github.com/uber-go/fx. I separate my code into packages in exactly the same way that you want to do and fx takes care of the DI.
Any workflow with dependent functions?
2 projects | reddit.com/r/golang | 10 Aug 2021
Gracefully shutting down multiple servers in a single prorgam
2 projects | reddit.com/r/golang | 13 Jul 2021
I really like use fx as a dependency and lifecycle manager (https://github.com/uber-go/fx) here’s an example of how it can gracefully handle multiple server startups and shutdowns (https://github.com/brandenc40/green-mountain-grill/blob/master/server/server/server.go#L37)
Show HN: We wrote a book about building business applications in Go
7 projects | news.ycombinator.com | 13 May 2021
Take a look at the major DI frameworks for Go, Wire  and FX . They just plumb the gaps between methods that return types and methods that want them. Although technically they work for concrete types, 99% of the time it's going to be an interface, so that you can substitute a mock for testing.
Prior to DI frameworks we used global variables, often initialized in a package's init() method.
>The desire to do this reflects a misunderstanding of interfaces.
Generally you have a few layers: gRPC/HTTP/Kafka handler, business logic, and database or external service access. Layers are unit tested individually against mocks of the layers below. Because you're going to inject a mock, you can't depend on a concrete type, so you depend on an interface. Often when you're developing you want to know what the concrete implementation of a lower layer does, so it's useful to have "go-to-definition" see through the interface declaration to its implementations.
I think the implicit satisfaction of interfaces is very cool and I wish I had it in every language. I wouldn't give it up just to simplify the IDE's job. But the IDE having this functionality does matter.
Dependency injection in golang
1 project | reddit.com/r/golang | 23 Apr 2021
Cryptogalaxy : An app to get crypto market data from multiple exchanges, written in Go
1 project | reddit.com/r/golang | 8 Apr 2021
Loos interesting. I would consider adding Makefile with tasks for building, testing, linting. Storage might be implemented as an interface in order to swap it more easily in the future (hexagonal architecture). Maybe uber/fx for dependency injection. Besides that, you can start working on the integration of other 350+ exchanges ;). Drop me a PM if you are interested in crypto tracking projects (we are building popular project in that space :)
Dependency Injection 2021
4 projects | reddit.com/r/golang | 24 Jan 2021
I use uber-go/fx in production and all my personal projects.
We haven't tracked posts mentioning container yet.
Tracking mentions began in Dec 2020.
What are some alternatives?
dig - A reflection based dependency injection toolkit for Go.
wire - Strict Runtime Dependency Injection for Golang
captcha - :sunglasses:Package captcha provides an easy to use, unopinionated API for captcha generation
di - 🛠 A full-featured dependency injection container for go programming language.
go.uuid - UUID package for Go
deckmaster - An application to control your Elgato Stream Deck on Linux
todo-api-microservice-example - Go microservice tutorial project using Domain Driven Design and Onion Architecture!
watermill - Building event-driven applications the easy way in Go.
goioc/di - Simple and yet powerful Dependency Injection for Go
archiver - Easily create & extract archives, and compress & decompress files of various formats
gocontainer - Simple Dependency Injection Container