pattmax00 / GoWeb

[Mirror] A Go web framework with user authentication, CSRF protection, templating, config handling, and simple migrations out of the box

Home Page:https://git.mpatterson.xyz/max/GoWeb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Command line flags and Configuration

tfasano1 opened this issue · comments

I may recall you saying you want to incorporate cli flags into goweb?
I've recently had success with a flags library https://github.com/spf13/pflag

This calls into question how we manage configuration. What type of things should be in a config file, and
what others should be configured on the cli? For example, I think it'd be more manageable to leave
db information in env.json but configure port as a cli flag.

The main gripe with using json for configuration is the lack of an ability to comment the file.
Perhaps toml, or another ml would suffice if there's an easy to use go library.

I will look into switching to TOML