wire icon indicating copy to clipboard operation
wire copied to clipboard

Compile-time Dependency Injection for Go

Results 121 wire issues
Sort by recently updated
recently updated
newest added

This fixes error message mismatch in InterfaceBindingNotEnoughArgs and InterfaceValueNotEnoughArgs with Go 1.18. The Go version in tests.yml GitHub workflow is updated accordingly. Fixes #355

Anonymous imports were being special-cased and written out separately. They're not that special though, we can just count them as regular imports with the name "_". This causes them to...

### Describe the bug If I have an anonymous import in a package that uses Wire, that import gets copied to wire_gen.go, but it gets copied in some separate import...

### Discussed in https://github.com/google/wire/discussions/304 Originally posted by **bereyes** August 18, 2021 Sorry , I have a question: wire.go file must be on main package? If I have wire.go in another...

Struct Providers occurs "unknown pattern", Case: ``` package domain_service ... func ProvidePRDomainService() ProcurementRequestDomainService { return ProcurementRequestDomainService{ } } ... package main ... type ProcurementRequestServiceImpl struct { prDomainService domain_service.ProcurementRequestDomainService } func...

after command "wire" execute, duplicate funciton name will exist in a same package, for example "InitializeApi" how to solve, thx

needs info

### Describe the bug TestWire/InterfaceValueNotEnoughArgs and TestWire/InterfaceBindingNotEnoughArgs pass with Go 1.17 but fail with Go 1.18. ### To Reproduce Steps to reproduce the behavior. ```console $ go version go version...

When `wire` command generate `wire_gen.go` file, `go generate` will not be work in module mode ``` $ go generate ./... /Users/kb/.go/pkg/mod/github.com/google/[email protected]/cmd/wire/main.go:34:2: missing go.sum entry for module providing package github.com/google/subcommands (imported...

Hey, I recently started trying `wire` just to check it out, what are it's capabilities and should I make a switch from `fx`. I must say that I like the...

To fix the check_api_change.sh build check, change branch name to reflect current default branch of repo. Building on the [workaround](https://github.com/google/wire/pull/316) for the `check_api_change.sh` script failing, this change would make the...