Fx Alternatives

Similar projects and alternatives to fx

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better fx alternative or higher similarity.

Suggest an alternative to fx

Reviews and mentions

Posts with mentions or reviews of fx. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-08-26.
  • [Question] How to split main.go into separate packages/files whilst maintaining Dependency Injection?
    reddit.com/r/golang | 2021-08-26
    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?
    reddit.com/r/golang | 2021-08-10
  • Gracefully shutting down multiple servers in a single prorgam
    reddit.com/r/golang | 2021-07-13
    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
    news.ycombinator.com | 2021-05-13
    Take a look at the major DI frameworks for Go, Wire [0] and FX [1]. 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.

    [0] https://github.com/google/wire

    [1] https://github.com/uber-go/fx

  • Dependency injection in golang
    reddit.com/r/golang | 2021-04-23
  • Cryptogalaxy : An app to get crypto market data from multiple exchanges, written in Go
    reddit.com/r/golang | 2021-04-08
    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
    reddit.com/r/golang | 2021-01-24
    I use uber-go/fx in production and all my personal projects.


Basic fx repo stats
28 days ago

uber-go/fx is an open source project licensed under MIT License which is an OSI approved license.

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Find remote Go jobs at our new job board 99remotejobs.com. There are 7 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.