awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
facebookarchive avatar

facebookarchive/injectArchived

0
View on GitHub↗
1,408 stars·138 forks·Go·MIT·23 viewsgodoc.org/github.com/facebookgo/inject↗

Inject

Inject is a dependency injection framework for Go that automates the assembly of complex object graphs. By leveraging runtime reflection, the library dynamically inspects object structures to resolve and populate required dependencies, decoupling component initialization from business logic.

The framework manages object lifecycles through both singleton and factory-based provisioning. It maintains a central registry to share singletons across an application for consistent state, while also supporting the creation of unique, private instances to isolate state between different components.

To handle complex requirements, the system provides a named provider registry that allows for the disambiguation of multiple instances of the same type. It traverses dependency graphs to automatically wire components based on either type or specific string identifiers, reducing the need for manual initialization code.

Features

  • Dependency Injection Containers - Acts as a dependency injection container that manages object lifecycles and automatic component wiring.
  • Reflection-Based Dependency Resolution - Uses runtime reflection to dynamically inspect object structures and automatically populate dependencies.
  • Dependency Injection Frameworks - Provides a framework for automating the assembly of complex object graphs and decoupling component initialization.
  • Go DI Frameworks - Automates dependency resolution and wiring in Go applications using reflection-based initialization.
  • Dependency Injection - Automates the connection of complex object graphs by injecting required components into structures.
  • Engine Instance Isolation - Isolates state by generating unique, non-shared instances for specific dependencies.
  • Singleton Component Management - Manages singleton lifecycles by maintaining a central cache of shared instances for consistent state.
  • Unique Instance Provisioning - Supports factory-based provisioning to generate unique, non-shared object instances for state isolation.
  • Go Application Patterns - Structures Go applications by decoupling object creation from business logic to improve maintainability.
  • Automated Dependency Wiring - Wires object dependencies by automatically resolving connections based on types or names to simplify component setup.
  • Singleton Instance Sharing - Maintains shared singleton instances across the object graph to ensure consistent state and memory efficiency.
  • Named Dependency Resolution - Resolves ambiguity between multiple instances of the same type by linking requested names to specific providers.
  • Type-Based Dependency Mappings - Resolves dependencies by matching requested types against a registry of available providers.
  • Provider Registries - Implements a named provider registry to disambiguate multiple instances of the same type using string identifiers.
  • Go Struct Reflection Utilities - Provides reflection utilities for inspecting Go structures and managing object instances dynamically.
  • Dependency Graph Traversals - Provides automated traversal of dependency graphs to resolve complex object relationships and satisfy component requirements.

Star history

Star history chart for facebookarchive/injectStar history chart for facebookarchive/inject

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does facebookarchive/inject do?

Inject is a dependency injection framework for Go that automates the assembly of complex object graphs. By leveraging runtime reflection, the library dynamically inspects object structures to resolve and populate required dependencies, decoupling component initialization from business logic.

What are the main features of facebookarchive/inject?

The main features of facebookarchive/inject are: Dependency Injection Containers, Reflection-Based Dependency Resolution, Dependency Injection Frameworks, Go DI Frameworks, Dependency Injection, Engine Instance Isolation, Singleton Component Management, Unique Instance Provisioning.

What are some open-source alternatives to facebookarchive/inject?

Open-source alternatives to facebookarchive/inject include: uber-go/fx — Fx is a dependency injection framework and application lifecycle manager for Go. It functions as a component model… uber-go/dig — dig is a reflection-based dependency injection framework and object graph resolver for Go. It functions as a container… codegangsta/inject — Inject is a dependency injection library for Go that manages object lifecycles and wires application components by… code4craft/tiny-spring — tiny-spring is a Java inversion of control container and aspect-oriented programming framework. It provides a system… jeffijoe/awilix — Awilix is a JavaScript dependency injection framework and inversion of control container. It provides a centralized… autofac/autofac — Autofac is a dependency injection framework and inversion of control container for .NET. It functions as a component…

Open-source alternatives to Inject

Similar open-source projects, ranked by how many features they share with Inject.
  • uber-go/fxuber-go avatar

    uber-go/fx

    7,354View on GitHub↗

    Fx is a dependency injection framework and application lifecycle manager for Go. It functions as a component model container that automates the instantiation and connection of components by analyzing constructor parameters and return values to resolve complex dependency graphs. The framework distinguishes itself through module-based component bundling, which encapsulates related constructors into reusable units to manage visibility and logic. It provides advanced resolution capabilities, including mapping concrete types to interfaces for decoupling, resolving dependency ambiguities via unique

    Goapp-frameworkdependency-injectionframework
    View on GitHub↗7,354
  • uber-go/diguber-go avatar

    uber-go/dig

    4,470View on GitHub↗

    dig is a reflection-based dependency injection framework and object graph resolver for Go. It functions as a container that automatically satisfies type dependencies and manages the instantiation of complex networks of objects during application startup. The project utilizes a directed acyclic graph to determine the necessary sequence for object instantiation and employs interface-driven provider mapping to decouple concrete implementations from their satisfied interfaces. It resolves the object hierarchy through reflection-based type resolution and single-pass component wiring to ensure all

    Godependency-injectiondigo
    View on GitHub↗4,470
  • codegangsta/injectcodegangsta avatar

    codegangsta/inject

    978View on GitHub↗

    Inject is a dependency injection library for Go that manages object lifecycles and wires application components by automating the provision of dependencies. It functions as a reflection-based container that maps specific values to their corresponding types, enabling the automatic retrieval and injection of objects into application logic. The library distinguishes itself through its ability to perform automatic function invocation, where it inspects function signatures at runtime to resolve and provide required arguments from a central registry. It also supports struct field injection, which p

    Go
    View on GitHub↗978
  • code4craft/tiny-springcode4craft avatar

    code4craft/tiny-spring

    4,089View on GitHub↗

    tiny-spring is a Java inversion of control container and aspect-oriented programming framework. It provides a system for managing object lifecycles and dependency injection to decouple application components. The project features a bytecode proxy generator that enables method interception and behavioral modification for classes that do not implement interfaces. It uses pointcut expressions to match specific classes and methods for the execution of cross-cutting logic via dynamic proxies. The framework manages singleton components and resolves object dependencies using lazy initialization. Ap

    Java
    View on GitHub↗4,089
See all 30 alternatives to Inject→

Curated searches featuring Inject

Hand-picked collections where Inject appears.
  • Dependency injection framework
  • Go Dependency Injection Toolkits