Go API Project Set-Up

This page summarizes the projects mentioned and recommended in the original post on dev.to

Kargo - Stop Scripting Promotions. Start Shipping with Kargo
Kargo automates promotion across dev, staging, and prod with approval gates and verification. Open source, built by the team behind Argo CD. Download now.
akuity.io
sponsored
AppSignal - Monitoring that respects your time & budget
APM, error tracking, and dashboards for modern web apps. Ten-minute setup, transparent flat pricing, and support from engineers who actually use the product.
www.appsignal.com
sponsored
  1. golang-standards/project-layout

    Standard Go Project Layout

    In the case of a Go-based project my starting point is the project layout which is documented in the golang-standards Project Layout.

  2. Kargo

    Stop Scripting Promotions. Start Shipping with Kargo. Kargo automates promotion across dev, staging, and prod with approval gates and verification. Open source, built by the team behind Argo CD. Download now.

    Kargo logo
  3. gomock

    Discontinued GoMock is a mocking framework for the Go programming language. (by golang)

    Unit tests are leveraged to test individual units of code. As such it is not recommended for a developer to scaffold entire dependencies for the sake of testing a single object. Due to the way Go's specific implementations work, I've learned over time to declare interfaces for a lot of the structs that I use in Go. Interfaces not only define a contract for which struct-based implementations should adhere, but they also provide a mechanism for which struct methods can be mocked. While I've experimented with the mock package in testify, I've come to prefer the mock functionality which is provided by mockgen.

  4. gotestsum

    'go test' runner with output optimized for humans, JUnit XML for CI integration, and a summary of the test results.

    The go test command does not support test reporting out of the box. To generate a test report, we have to use gotestsum to generate a JUnit report. We add gotestsum to our tools.go file:

  5. gocover-cobertura

    golang : go tool cover to XML (Cobertura) export tool.

    To report coverage to GitLab we have to use a tool which can convert the coverage report from go test to Cobertura. We'll pull in gocover-cobertura to generate our coverage report.

  6. hub-feedback

    Feedback and bug reports for the Docker Hub

    The next block in .gitlab-ci.yml is the services block. Since our tests use testcontainers package and we're pushing a docker container onto Dockerhub, we will need to specify a services block next. Services will enable our pipeline to leverage Docker-in-Docker DinD.

  7. testcontainers-go

    Testcontainers for Go is a Go package that makes it simple to create and clean up container-based dependencies for automated integration/smoke tests. The clean, easy-to-use API enables developers to programmatically define containers that should be run as part of a test and clean up those resources when the test is done.

    The next block in .gitlab-ci.yml is the services block. Since our tests use testcontainers package and we're pushing a docker container onto Dockerhub, we will need to specify a services block next. Services will enable our pipeline to leverage Docker-in-Docker DinD.

  8. golangci-lint

    Fast linters runner for Go

    golangci lint - https://golangci-lint.run/

  9. AppSignal

    Monitoring that respects your time & budget. APM, error tracking, and dashboards for modern web apps. Ten-minute setup, transparent flat pricing, and support from engineers who actually use the product.

    AppSignal logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Building an API in Go to Manage Files on Amazon S3

    5 projects | dev.to | 20 Jan 2026
  • Building a RESTful API with Go Fiber: An Express-Inspired Boilerplate

    13 projects | dev.to | 5 Oct 2024
  • TIL: panic(spew.Sdump(myVar))

    8 projects | /r/golang | 10 Jan 2023
  • Read/Write FileSystem header interface for dependency injection

    7 projects | /r/golang | 29 May 2022
  • Alternative for Monkey patching

    3 projects | /r/golang | 23 Mar 2022