wire README

The project's README from github.com/google/wire. As one markdown file: README.md.

Wire: Automated Initialization in Go

Build Status godoc

[!WARNING] This project is no longer maintained.

If you wish to update or extend wire, please do so in a fork.

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.

For an overview, see the introductory blog post.

Installing

Install Wire by running:

go install github.com/google/wire/cmd/wire@latest

and ensuring that $GOPATH/bin is added to your $PATH.

Documentation

Project status

As of version v0.3.0, Wire is beta and is considered feature complete. It works well for the tasks it was designed to perform, and we prefer to keep it as simple as possible.

We'll not be accepting new features at this time, but will gladly accept bug reports and fixes.

Community

For questions, please use GitHub Discussions.

This project is covered by the Go Code of Conduct.

wire (google/wire)

Searching Database…

14.4K ·GitHub
archived
What is this?Wire is a code generation tool from Google that automates connecting components in Go using dependency injection: you declare providers, and Wire writes the initialization code that wires them together.
Is it a library my program uses at runtime, or a tool I run at build time?It is a command-line code generator: it emits ordinary Go initialization code and operates without runtime state or reflection, so nothing Wire-specific ships in your binary.
Is Wire still actively developed?No — the repository is archived and the README warns the project is no longer maintained. It is beta but considered feature complete as of v0.3.0, and upstream accepts only bug reports and fixes.
How does Wire want me to connect components?Dependencies are expressed as plain function parameters between provider functions, which encourages explicit initialization instead of global variables — and since nothing runs at runtime, those same functions stay useful if you ever hand-write the initialization.
Where should I start reading once it is installed?The README links a Tutorial, a User Guide, a Best Practices doc and an FAQ, all kept in the repository's docs folder.
Can I add my own features to Wire?Not upstream: the README asks anyone who wants to update or extend wire to do so in a fork, while the original project only accepts bug reports and fixes.
Creator
google
Size
0.5 MB
Stars
14.4K
Age
7y
Commits · 90 Days