Categorygithub.com/GabrielAp542/goTaskApi
modulepackage
0.0.0-20240729175701-b7fbb66308d6
Repository: https://github.com/gabrielap542/gotaskapi.git
Documentation: pkg.go.dev

# README

Golang API

Dependencies

  • Gin - Framework, v1.9.1
  • GORM - Object Relational Mapping, v1.25.6
  • Testify - testing toolkit, v1.8.4
  • swag - swagger, v1.6.0
  • gin-swagger - gin middleware to swagger, v1.16.3

Requirements

  • docker-engine or docker desktop at least version 25.0.2
  • docker compose 2.24.5 or above
  • golang 1.21.6 or above for develop

Tools

  • Visual Studio Code - IDE
  • Bash - terminal
  • Postman - testing

Building

local dev

  1. go to repo location in your computer and use the following command to download and install all dependencies
$ go mod tidy

docker

  1. Open terminal and go to the repositories's directory
  2. Build docker compose
$ docker compose build
  1. Start docker compose
$ docker compose up

Testing

unit testing

  • executes all unit testing
$ go test ./...

code coverage

  1. Open terminal and go to the repositories's directory
  2. Execute command to create coverage.out via unit testing
go test -coverprofile=coverage.out ./...
  1. Execute command to generate html file
go tool cover -html=coverage.out -o coverage.html
  1. Open html file on browser to check coverage

Documentation

swagger

Docs

# Packages

Package docs Code generated by swaggo/swag.
No description provided by the author
No description provided by the author