KaijuEngine / kaiju

Kaiju Engine - Multiplatform 2D and 3D Vulkan game engine written in Go/Golang
https://kaijuengine.org
Other
89 stars 4 forks source link

Question: Willing to adopt "standard" layout? #82

Open gravestench opened 9 months ago

gravestench commented 9 months ago

Would you be open to adopting the "standard" project layout to organize the repo? I know that there isn't really a standard layout for golang projects, but this is a pattern than you'll see out in the wild quite often. For instance, docker and kubernetes use this to structure their projects.

I see that you already have multiple applications in mind (runtime vs editor, both windows and linux), and having a single main.go in the repo root doesnt really represent your intention. Currently, the main.go in the repo root looks (to me) like an example of using the Kaiju engine. Using this "standard" project layout, it might look something like this: image

The refactor effort would be fairly minimal; just moving some things around. Most of what's in the root of the repo would go into either pkg or internal directories depending on whether you intend for them to be used in an external codebase.

I'm interested to hear what you think about this, and would definitely collaborate and create a video if you opened an issue for this.

BrentFarris commented 9 months ago

Sorry for the late reply.

I'm open to refactor the layout. I've done a lot of go programming but I've not really explored much of what others have done for their repository layout. If there is something closer to a "standard", I'm willing to try it out. For the most part I've been working in Go a little bit like I do in C when it comes to project structure (minus a root src folder).

BrentFarris commented 9 months ago

I popped all the source code into a src folder for now (like a C project or the Go compiler code). This is just to clean it up so the root doesn't have so many folders. It's not a completion or a denial of this request, just something I can do right now to clean up things while working on other stuff.