fizzbuzz

module
v0.0.0-...-6554e27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2021 License: AGPL-3.0

README

Coverage Testing: 87.5% 😇

Fizzbuzz

This is a server that computes the result of a fizzbuzz .

Read the file subject.txt for more reliable information about how the server works.

The server can be run in persistent mode or inmemory mode for storing statistics.

Just change the STORE_MODE environment variable to choose mode: set value (inmemory|persistent) in docker-compose file.

Simply run make up and go to http://localhost:3000/swagger/index.html#/

Requirements

  • GNU Make
  • Docker-Compose
  • Docker
  • Golang >= 1.17 (required only for development purpose)
Environment variables

To run the project, you need to set environment variables. The default variables are set in the docker-compose.yml file.

Run

They are two mode to run the service:

  • default mode
  • development mode

make up to start the stack with all necessary services to run service.

make dev should be equivalent to the default mode with a hot reload system in addition, useful for development purposes.

Local services

Quality code

You need to run make tools to install the different tools needed for testing, linting ...

Testing

make test to execute unit tests.

You can check the code coverage of the project by running this commands:

  • make cover
  • make cover-html
Linting

We use staticcheck as linter.

make lint to execute linting.

Directories

Path Synopsis
cmd
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
pkg
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL