golang-standards/project-layout
go-structure-examples
Our great sponsors
golang-standards/project-layout | go-structure-examples | |
---|---|---|
195 | 16 | |
45,717 | 2,300 | |
1.9% | - | |
6.4 | 0.0 | |
about 1 month ago | 11 months ago | |
Makefile | Go | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
golang-standards/project-layout
-
The power of the CLI with Golang and Cobra CLI
cmd: here where we will leave the main.go that starts our app.
-
What's your go to literature to build Go libraries?
> https://github.com/golang-standards/project-layout
The name of the repo is really and intentionally misleading. rsc filled an issue there to point this out, but the repo maintainer just disabled issues altogether so now no one can see it.
Even when it would not have such parasitic name, many seasoned Go programmers, me included, consider the self-proclaimed "Standard Go project Layout" as the opposite of what is good and advisable.
Unfortunately, the name just works, so it is being recommended all over the Internet since its inception.
-
"14 Years of Go" by Rob Pike
Your comment makes it look as if you're saying you hate the Go development team, but it seems that isn't the case.
I get a little of what you're saying, I wouldn't say I hate anyone, but I strongly dislike how a lot of projects are organized. I think a lot stems from https://github.com/golang-standards/project-layout , which pretended to be standard and was so (ab)used one of the creators opened an issue about it. If you look at the actual Go src, it's much, much cleaner.
-
Looking for elegant code bases written in GoLang
So you don't get blind sided for self proclaimed "standards" that are not
- I'm coming from Java and I have been told that I'm writing go like I'm writing Java. Basically creating structs, injecting fields, and attaching methods. What else can I do?
- O poder do CLI com Golang e Cobra CLI
- Como deixar o Swagger com tema dark mode usando Swaggo e Golang
-
Can I point a module to a subdirectory?
I am writing a project that has two components: a CLI and a library. I've organised the project as follows (as per organisation instructions):
-
How To Build A Containerized Microservice in Golang: A Step-by-step Guide with Example Use-Case
Familiarity with the standard Golang project structure, which you can find here.
-
Building RESTful API with Hexagonal Architecture in Go
I've been learning how to build web applications using different frameworks and languages for a while now, such as Laravel with its MVC architecture and Node.js following the 'Hapi.js Way'. As I'm trying to create a new portfolio project using Go, I found myself contemplating over the ideal project structure. I wanted something that not only aligns with the standard Go project layout, but also makes the code both easy to write and understand. That's when I stumbled upon the concept of Hexagonal Architecture, as showcased in Netflix's engineering blog. The idea of seamlessly swapping infrastructures with minimal code changes fascinated me, and I decided to implement it in my new project.
go-structure-examples
- How often do you use OOP design patterns while writing Go?
-
Hexagonal architecture and mocking
I have a question, I am trying out hexagonal architecture for one of my projects trying to follow this repository example and I ran into a slight problem.
-
Extra tool using main applications Go Ent structure question
Just fyi, that repo is NOT considered standard, and in fact, is often advised against. The structure of your code should depend on its complexity and how interoperable with other projects you need/would like it to be. I suggest watching this talk on structuring your code and taking a look at this companion repo to decide which will be the best way to structure your code, depending on your needs
-
Package Organization Approaches in Go
Kat Zien's excellent talk, presentation and code samples can be found here.
-
Go package&filename convention question from a Java developer
Thanks for the video, I'll take a look at it. And I checked the repo, I liked how the new is structured: https://github.com/katzien/go-structure-examples/tree/master/new
-
Next month I'll start working at a company as a Backend Developer and will be mostly using Go. How can I better prepare myself?
So here’s where I normally tell people to start off: check out this video and this repo in regards to the main 6 ways of architecting your Go applications.
-
how to structure a project?
Watch this and give this repo a look.
-
DDD file structure & cyclic dependencies
Am I completely fumbling it by approaching this the wrong way & if so what should I do differently? I have searched a few repos like this which redefines the same entity in multiple places which I feel is a violation of some sort, and this which the author had to resort to moving some files outside to overcome a circular dependency (see comments inside their handling.go file).
-
Is there any conventionally accepted repo that is representative of well designed go code ?
Really surprised I haven’t seen katzien/go-structure-example and her GopherCon 2018 talk about structuring your Go projects mentioned yet
-
Building a REST API with GO, Gin framework, and GORM.
Let's agree to leave the MVC model for OO languages. A better architecture would be something like katzien/go-structure-examples
What are some alternatives?
uber-go-style-guide-kr - Uber's Go Style Guide Official Translation in Korean. Linked to the uber-go/guide as a part of contributions
fx - A dependency injection based application framework for Go.
modern-go-application - Modern Go Application example
go-clean-template - Clean Architecture template for Golang services
uber-go-style-guide-th - Uber's Go Style Guide Translation in Thai. Linked to the uber-go/guide as a part of contributions https://github.com/uber-go/guide
go-c2dmc - A Go package for converting RGB and other color formats/colorspaces into DMC thread colors (DMC color name and floss number)
go-restful-api - An idiomatic Go REST API starter kit (boilerplate) following the SOLID principles and Clean Architecture
waypoint - A tool to build, deploy, and release any application on any platform.
cookiecutter-golang - A Go project template
JSON2App
go-sample - Go Project Sample Layout
todo-api-microservice-example - Go microservice tutorial project using Domain Driven Design and Onion Architecture!