Skip to content

Konmoron/init-gin-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

init gin project

Documentation

introduction

init a gin project.

  • use zap as logger
  • use viper to read config.yaml
  • set healthcheck router
  • add unittest for healthcheck router

about config

some config, such as db config or password, cannot upload to github or other online website. so we need read from OS.ENV.

  1. read config from config.yaml
  2. read config from OS.ENV

the name of config in os must be SCREAMING_SNAKE_CASE. such as: the name of config.AppName in os is APP_NAME.

about unittest

cd test
go test -v -run TestHealthcheckRoute

about swagger

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages