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

Did you put the build constraints in wire.go? For example see https://github.com/google/wire/blob/9d78e0ad8cbeb6716fa6bdbca689bdb9ce0e8fe8/_tutorial/wire.go#L15-L16
If this doesn't work, can you provide a more detailed repro step? e.g. What does your source look like, and what command did you run that tells you "redeclare in this package". Thanks!
@whybangbang don't forget the add trailing line
//go:build wireinject
// +build wireinject