krok
go-structure-examples
Our great sponsors
krok | go-structure-examples | |
---|---|---|
9 | 16 | |
13 | 2,293 | |
- | - | |
0.0 | 0.0 | |
over 1 year ago | 11 months ago | |
Go | Go | |
Apache License 2.0 | 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.
krok
-
my first golang project!
Tests!!! You have none. :) If you want to test with a real DB instead of mocking everything you can do that with an ephemeral container that spins up relatively fast. Here is an example for that: https://github.com/krok-o/krok/blob/main/tests/livestore/init_test.go ( This might be a bit over your head depending on your experience maybe this post is better: https://docs.docker.com/language/golang/run-tests/ )
-
need help with "os/exec"
As others suggested, using the API is nicer. If you are looking for a nice example on how to do that take a look at my docker container executor code here: https://github.com/krok-o/krok/blob/main/pkg/krok/providers/executor/in_memory_executor.go :)
-
Presenting Krok - Multiplatform webhook handling system with containerised commands
I would like to present a project I've been working on for 1.5 years or so, called Krok Github, Krok Website.
-
[Question] How to split main.go into separate packages/files whilst maintaining Dependency Injection?
Here is a fairly complex project which does just this: https://github.com/krok-o/krok
-
What is the fastest way to clear my SQL database between integration tests?
This creates a temporary database in a docker container while you are running your test. For an example look here: https://github.com/krok-o/krok/blob/main/tests/livestore/init_test.go
go-structure-examples
-
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
-
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
Watch this video and take a look at this repo. They should really help answer your question.
-
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
- Structure of a Simple Golang Project
What are some alternatives?
fx - A dependency injection based application framework for Go.
go-clean-template - Clean Architecture template for Golang services
typhon - A wrapper around Go's net/http to provide safety and convenience. At Monzo, Typhon forms the basis of most clients and servers in our microservices platform.
go-c2dmc - A Go package for converting RGB and other color formats/colorspaces into DMC thread colors (DMC color name and floss number)
golang-standards/project-layout - Standard Go Project Layout
waypoint - A tool to build, deploy, and release any application on any platform.
todo-api-microservice-example - Go microservice tutorial project using Domain Driven Design and Onion Architecture!
JSON2App
sql-migrate - SQL schema migration tool for Go.
microservicebotexample
txdriver - txdriver provides transaction isolation for Go SQL tests