paulhammond/slackcat — pull request #6 by skattyadz (2014-11-16 19:55:33+00:00)
Title: Allow config through environment variables

We store and manage keys for tools like slackcat through environment variables. It an easy way for us to provision servers while keeping packages public. I figured this would be a useful addition to the project, so I've added support for it.

The first commit adds some methods to the Config struct containing this change. I wanted config options to cascade so that base options can be overridden by env vars (or other config files). The second commit makes handling CLI flags a configuration concern. I've kept it separate in case you would rather it worked a different way.

I've noticed some inconsistencies between `username` and `name`, `icon` and `icon_emoji`. It'd be good to make these more consistent, but I thought I'd let you make that call (are you bothered about backwards compatibility?)

Cheers
-a