go-zero
go-zero copied to clipboard
fix: quickstart dont work
the default quickstart section do not work for the command order
this would failed beginner
Maybe deleted go mod init should be work.
go version go1.22.3 linux/amd64
I can generate code by executing
goctl api new greet, but an error ocurred while running the project, do you mean it can not work beacuse of this issue block your learning step?
@kesonan not only the failing blocked my learning path but also the steps has other issues in the middle, please check the following screenshots
as showed above, if i began with a fresh directory, it will has problem when running go mod init which required my gaving the mod name , and after i gaved the mod name to init, it then caused bigger problem when running the sample code
and i paste the generated code here sample.zip
Your problem looks like the go environment has not been handled properly, you can check from the following aspects:
- whether the go module feature is enabled
- whether it is under the gopath directory