Wire is a code generation tool that automates connecting components using dependency injection. Dependencies between components are represented in Wire as function parameters, encouraging explicit initialization instead of global variables. Because Wire operates without runtime state or reflection, code written to be used with Wire is useful even for hand-written initialization. Dependency injection is a standard technique for producing flexible and loosely coupled code, by explicitly providing components with all of the dependencies they need to work. In Go, this often takes the form of passing dependencies to constructors. Dependency injection tools like Wire aim to simplify the management of initialization code. You describe your services and their dependencies, either as code or as configuration, then Wire processes the resulting graph to figure out ordering and how to pass each service what it needs.

Features

  • Providers are ordinary Go functions that “provide” values given their dependencies
  • Injectors are generated functions that call providers in dependency order
  • Providers that are commonly used together can be grouped into ProviderSets
  • Any non-injector declarations are copied into the generated file
  • Wire’s dependency graph is knowable statically
  • Dependency injection tools like Wire aim to simplify the management of initialization code

Project Samples

Project Activity

See All Activity >

Categories

Compilers

License

Apache License V2.0

Follow Wire

Wire Web Site

Other Useful Business Software
Enterprise-grade ITSM, for every business Icon
Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity.

Freshservice is an intuitive, AI-powered platform that helps IT, operations, and business teams deliver exceptional service without the usual complexity. Automate repetitive tasks, resolve issues faster, and provide seamless support across the organization. From managing incidents and assets to driving smarter decisions, Freshservice makes it easy to stay efficient and scale with confidence.
Try it Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Wire!

Additional Project Details

Programming Language

Go

Related Categories

Go Compilers

Registered

2021-09-01