Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/google/wire
Compile-time Dependency Injection for Go
https://github.com/google/wire
codegen dependency-injection go golang initialization
Last synced: 4 days ago
JSON representation
Compile-time Dependency Injection for Go
- Host: GitHub
- URL: https://github.com/google/wire
- Owner: google
- License: apache-2.0
- Created: 2018-11-28T17:34:51.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-03-11T00:09:28.000Z (9 months ago)
- Last Synced: 2024-05-08T21:47:43.103Z (7 months ago)
- Topics: codegen, dependency-injection, go, golang, initialization
- Language: Go
- Homepage:
- Size: 480 KB
- Stars: 12,363
- Watchers: 111
- Forks: 609
- Open Issues: 97
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Authors: AUTHORS
Awesome Lists containing this project
- awesome-go - google/wire - Automated Initialization in Go. (Miscellaneous / Dependency Injection)
- awesome-go - google/wire - time Dependency Injection for Go|10,612| (Popular)
- stars - google/wire - time Dependency Injection for Go (HarmonyOS / Windows Manager)
- zero-alloc-awesome-go - google/wire - Automated Initialization in Go. (Miscellaneous / Dependency Injection)
- my-awesome - google/wire - injection,go,golang,initialization pushed_at:2024-07 star:13.2k fork:0.6k Compile-time Dependency Injection for Go (Go)
- awesome-ccamel - google/wire - Compile-time Dependency Injection for Go (Go)
- awesome-repositories - google/wire - Compile-time Dependency Injection for Go (Go)
- awesome-starts - google/wire - Compile-time Dependency Injection for Go (Go)
- awesome-go - google/wire - Automated Initialization in Go. Stars:`13.1K`. (Miscellaneous / Dependency Injection)
- awesome-golang-repositories - wire - time Dependency Injection for Go (Repositories)
- awesome-go-extra - wire - time Dependency Injection for Go|8931|487|86|2018-11-28T17:34:51Z|2022-08-24T14:24:04Z| (Microsoft Office / Dependency Injection)
- awesome-go - wire - 自动初始化工具。 (常用依赖注入库 / 交互工具)
- awesome-go - wire - 自动初始化工具。 (常用依赖注入库 / 交互工具)
- awesome - google/wire - Compile-time Dependency Injection for Go (Go)
- awesome - google/wire - Compile-time Dependency Injection for Go (Go)
README
# Wire: Automated Initialization in Go
[![Build Status](https://github.com/google/wire/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/google/wire/actions)
[![godoc](https://godoc.org/github.com/google/wire?status.svg)][godoc]
[![Coverage](https://codecov.io/gh/google/wire/branch/master/graph/badge.svg)](https://codecov.io/gh/google/wire)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][].
[dependency injection]: https://en.wikipedia.org/wiki/Dependency_injection
[introductory blog post]: https://blog.golang.org/wire
[godoc]: https://godoc.org/github.com/google/wire
[travis]: https://travis-ci.com/google/wire## Installing
Install Wire by running:
```shell
go install github.com/google/wire/cmd/wire@latest
```and ensuring that `$GOPATH/bin` is added to your `$PATH`.
## Documentation
- [Tutorial][]
- [User Guide][]
- [Best Practices][]
- [FAQ][][Tutorial]: ./_tutorial/README.md
[Best Practices]: ./docs/best-practices.md
[FAQ]: ./docs/faq.md
[User Guide]: ./docs/guide.md## 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](https://github.com/google/wire/discussions).
This project is covered by the Go [Code of Conduct][].
[Code of Conduct]: ./CODE_OF_CONDUCT.md
[go-cloud mailing list]: https://groups.google.com/forum/#!forum/go-cloud