I have main.go in which i am creating my logger using the InitializeLogger methods from wire. here is how my wire.go looks like
//+build wireinject
package main
func InitializeLogger(writer io.Writer, options ...func(*servicelogger.Logger)) servicelogger.Logger {
panic(wire.Build(servicelogger.New))
}
func InitializeColorLogger(writer io.Writer, options ...func(*servicelogger.Logger)) servicelogger.Logger {
panic(wire.Build(servicelogger.NewColorLogger))
}
//------
now in the directory where i have this main.go and wire.go, I ran wire command and it successfully generated wire_gen.go. I build my project via make file. The command that builds the project is
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -o service-name cmd/servicename/main.go;
However, this command is giving me error that it couldn't find InitializeLogger and InitializeColorLogger
Is there any flag that i need to add to my build command?