/jsonconfigloader

Example project for config loading in Go

Primary LanguageGo

jsonconfigloader

This is just an example project for how to do the following:

  • Setting up a Configuration struct
  • Creating a function to generate a Config with default values
  • Creating a function to load configuration options from a JSON file overriding defaults
  • Parsing flags from the command line

Usage

go run main.go -config=test.json