-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing go run
or go build
example of generated code
#362
Comments
Yeah, I think there is something missing in the instructions as well. If I do
doing |
@troyatomic you need to execute the https://github.com/google/wire/blob/main/_tutorial/README.md#using-wire-to-generate-code |
I agree it would be good to add some documentation about this. I'm fairly new to Go, and this was not intuitive to me. Up till now, I've been running my project with
The same thing happens with After that, I tried to run it from my project root directory using
Finally, I figured out I need to put Anyway, all this is to say the documentation @cglotr is suggesting would have saved me some time and frustration. |
wire/_tutorial/README.md
Line 115 in 79660af
I think this step is a missing example of how to
run
orbuild
the generated code. Also, it's not obvious that we need also to include the generated files when executing eithergo run
orgo build
likego build main.go wire_gen.go
.I think adding an extra paragraph explaining how to run or build would be very useful & prevent frustration, especially for people new to go.
When following the steps, I think most people will set seeing the word
Hi there!
on the console to be the goal to verify that we get the same outcome as in the non-wire code.The text was updated successfully, but these errors were encountered: