Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

use google/wire with goland get undefined: InitializeEvent

i am learning google/wire with official tutorial, i can generate wire_gen.go file with wire command, but got erro :"undefined: InitializeEvent" when i start build using goland.

like image 632
Hayden Zhou Avatar asked Feb 01 '26 19:02

Hayden Zhou


1 Answers

if exec commond "go build main.go", go don't build wire_gen.go file. so we should use commond "go build" or "go build main.go wire_gen.go", then go will build both main.go and wire_gen.go.

in goland we should change build configuration enter image description here

like image 135
Hayden Zhou Avatar answered Feb 04 '26 14:02

Hayden Zhou



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!