danrjohnson / jsonconfigloader

Example project for config loading in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Example project for config loading in Go


Languages

Language:Go 100.0%