|
You are here |
markphelps.me | ||
| | | | |
threedots.tech
|
|
| | | | | In this guide, we share our pragmatic approach to Clean Architecture in Go, refined through years of real-world experimentation. We demonstrate refactoring techniques on a live project, showing how to extract application logic, define interfaces, and improve testability. You'll learn how to apply Clean Architecture principles in an idiomatic Go way, balancing theory with practical implementation. Our battle-tested methods help you create loosely coupled, highly cohesive code that's easier to maintain and extend over time. | |
| | | | |
mfbmina.dev
|
|
| | | | | Nowadays, a huge part of a developer's work consists in calling APIs, sometimes to integrate with a team within the company, sometimes to build an integration with a supplier. The other big role in daily work is to write tests. Tests ensure (or should guarantee :D) that all the code written by us works on how it is expected and, therefore, it will not happen any surprises when the feature is running at production environment. | |
| | | | |
konradreiche.com
|
|
| | | | | There are different ways of separating integration tests from your unit tests in Go. After discovering too many issues with some of the approaches I have settled with the following. func TestDatabase(t *testing.T) { integrationTest(t) // ... } func integrationTest(t *testing.T) { t.Helper() if os.Getenv("INTEGRATION") == "" { t.Skip("skipping integration tests, set environment variable INTEGRATION") } } Integration tests are marked as such at the top of the test function, similar to using t.Helper(). A test helper function is used to skip the test unless the environment variable is set. All tests, including integration tests, can be run with: | |
| | | | |
quii.dev
|
|
| | | Chris James, London - Software Engineer | ||