在同一个名称空间中以相同名称连线生成第二个函数

I'm having a look at Go wire. The problem I am having is that wire generates code from a template in a file in the same directory which means that there are now two functions with the same signature in the same namespace, which go, of course, does not like.

How should I deal with this? should i write a script which deletes the original file before running go build or go run ?

Just found the solution.

A build constraint (like //+build wireinject) needs to be followed by an empty line, otherwise it will be ignored by go build and the file will be included in the build.