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

wire

> AI 编程
Open source

Compile-time Dependency Injection for Go

14.4K stars0 likes1 views
WebsiteGitHub

About

Compile-time Dependency Injection for Go

Wire: Automated Initialization in Go

[!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:

bash
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

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.

Issues· 108 open

View all issuesOpen on GitHub
  • #381

    wire.NewSet support generics

    Updated Jul 14, 2025
  • #420

    Go workspaces broken in 1.24rc2

    Updated Jul 5, 2025
  • #428

    How change the package name of the generated classes

    Updated Jun 26, 2025
  • #221

    Bazel rule for generating injectors

    enhancementUpdated Jun 17, 2025
  • #425

    Severe Memory Spike (80G+) During Code Generation Leads to Process Termination

    Updated May 23, 2025
  • #48

    wire: create injectors in _test files

    enhancementUpdated Apr 10, 2025
  • #421

    Why are methods in ProviderSet that provide interfaces defined in the dependence project being generated as ’invalid type’?

    Updated Feb 6, 2025
  • #411

    wire does not work with go 1.23.0

    Updated Dec 4, 2024
  • #404

    go build -mod=vendor ./cmd/wire doesn't work after update to 0.6.0

    Updated Nov 28, 2024
  • #417

    Panic bug: build code with more than 1 generic type parameters

    Updated Oct 11, 2024

> Tags

Gocodegendependency-injectiongogolang

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.