-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[REQ] Better Structure for Go Server Project #1931
Comments
@zhoub thanks for the suggestion. I'm definitely not against that. The current project structure is very similar to the one in Go Gin: https://github.com/OpenAPITools/openapi-generator/tree/master/samples/server/petstore/go-gin-api-server My take is to adopt one or the other but not both. For |
@wing328 For what it's worth I have the following suggestions:
Hereby I refer to this go project structure guidelines: https://github.com/golang-standards/project-layout. It is an unofficial set of guidelines, but is adopted by a lot of the biggest go-projects. For example:
In its basic form the guidelines are about separating:
The https://github.com/golang-standards/project-layout already lists some citations, but I would like to add:
At least point 3. should be considered (in a more detailed way of course). Right now the flexibility is to define where the overall output folder or the generated "go" source code folder should be in the repository. To adapt the generated code to your project, incorporate a more common folder structure or respect go best practices, post-processing via scripting is required right now. |
Is your feature request related to a problem? Please describe.
Hi,
Now the go-server creates a project like this
Describe the solution you'd like
Shall we create a structure similar to the go-swagger generates folders.
Thanks !
The text was updated successfully, but these errors were encountered: