Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

fx

> 编程语言
Open source

A dependency injection based application framework for Go.

7.6K stars0 likes0 views
WebsiteGitHub

About

A dependency injection based application framework for Go.

:unicorn: Fx

Fx is a dependency injection system for Go.

Benefits

  • Eliminate globals: Fx helps you remove global state from your application. No more init() or global variables. Use Fx-managed singletons.
  • Code reuse: Fx lets teams within your organization build loosely-coupled and well-integrated shareable components.
  • Battle tested: Fx is the backbone of nearly all Go services at Uber.

See our docs to get started and/or learn more about Fx.

Installation

Use Go modules to install Fx in your application.

bash
go get go.uber.org/fx@v1

Getting started

To get started with Fx, start here.

Stability

This library is v1 and follows SemVer strictly.

No breaking changes will be made to exported APIs before v2.0.0.

This project follows the Go Release Policy. Each major version of Go is supported until there are two newer major releases.

Stargazers over time

Issues· 80 open

View all issuesOpen on GitHub
  • #1271

    Expose App.osExit method as an option

    Updated Sep 8, 2026
  • #1285

    Feature: fx.AsType[T] as generic wrapper over fx.As(new(T))

    Updated Aug 13, 2026
  • #681

    fx not usable in restricted Go runtime environments due to syscall reference

    Updated Jun 18, 2026
  • #755

    Example of using fx for a short-lived CLI process?

    Updated Jun 18, 2026
  • #1286

    API KEYS

    Updated Mar 31, 2026
  • #1281

    Feature Request: Support for Partial Struct Initialization Pattern

    Updated Nov 10, 2025
  • #1245

    A way to know that all OnStart hooks have completed

    Updated Oct 27, 2025
  • #1036

    Populate a map by combining name and group attributes

    enhancementUpdated Sep 29, 2025
  • #1132

    fx.Evaluate: Support dynamic graphs by returning fx.Option from constructors

    enhancementUpdated Sep 11, 2025
  • #1117

    Add ability to override os.Exit for fxtest

    enhancementUpdated May 13, 2025

> Tags

Goapp-frameworkdependency-injectionframeworkgo

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言