Go API Project Set-Up

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

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • 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.

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • 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.

  • 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:

  • 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.

  • 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.

  • 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.

  • golangci-lint

    Fast linters runner for Go

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

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub 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

  • 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
  • Monthly 'Shameless Self Promotion' thread - 2021/11

    3 projects | /r/devops | 1 Nov 2021
  • จัดการ Go dependencies tools ด้วย Go mod

    1 project | dev.to | 6 Sep 2024

Did you konow that Go is
the 4th most popular programming language
based on number of metions?