Skip to content

koddr/example-go-config-yaml

Repository files navigation

Example Go web app with YAML config

This is full project structure example of article Let's write config for your Golang web app on right way — YAML 👌.

Published on Dev.to @ 13 Feb 2020.

Requirements

  • Go 1.11+
  • Go Modules

Usage

  • Clone this repository and go to folder:
git clone https://github.com/koddr/example-go-config-yaml.git
cd example-go-config-yaml
  • Run server (by one of commands below):
# Build server, run tests, collect coverage info and run server:
make

# Only server with default config and without build and coverage info:
make run

# Use your own config file:
go run ./... -config my-config.yml
  • For show info about coverage (will open in browser):
make show_coverage
  • That's all! 🎉

Author

Code reviewer

Article assistance

If you want to say «thank you»:

  1. Twit about article on your Twitter.
  2. Add a GitHub Star and make Fork to this repository.
  3. Donate some money to project author via PayPal: @paypal.me/koddr or LiberaPay.
  4. Join DigitalOcean at my referral link (your profit is $100 and we get $25).

Thanks for your support! 😘

License

MIT