Skip to content

vinbyte/protip-golang-testing

Repository files navigation

Unit Testing using Go-chi and SQLMock

Overview

Some ProTip about Golang unit testing when the app using go-chi and sqlmock.

How to Run

Docker

  • Run your docker
  • Run docker-compose up

Non Docker

  • Copy paste .env.sample to .env and set your database credential
  • Run go run app/main.go

Test

  • Run go test -v ./...

Routes

Endpoint Method Description
/v1/users GET getting list of users
v1/users/{id} GET getting user by user id

About

Some ProTip about Golang Testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published