Skip to content

Releases: mediocregopher/flagconfig

New features

23 Sep 19:03
Compare
Choose a tag to compare

I added a bunch of new features which make creating command-line utilities easier.

Previously I had used flagconfig mostly for working with server applications, but I had to make a command-line utility recently and a bunch of features came out of that:

  • SetDefaultConfigFile, IgnoreMissingConfigFile - Useful for automatically looking for a configuration file for a program and loading it if found (think vimrc or bashrc)
  • Ability to change delimiter (-- be default)
  • Ability to make certain options only set-able on the command-line

Tablewriter and bugfixes

21 Dec 18:40
Compare
Choose a tag to compare

Use the github.com/mediocregopher/tablewriter package for prettier output on --help, and some bug-fixes related to how default values are shown on the command-lline and in the conf file

Use newest goat syntax

13 Dec 15:32
Compare
Choose a tag to compare

Goat v1.0.0 is out, so I'm switching over to its new yaml syntax.

Two new features, and slight breakage for import statements

07 Nov 02:10
Compare
Choose a tag to compare

Three things happened in this release:

  • The import path is now github.com/mediocregopher/flagconfig
  • New method DisallowConfig which makes it possible to only use flagconfig for command-line parsing
  • New method GetPositionals which returns all command-line parameters which aren't actual --key=value options

Bug fixes

04 Oct 19:24
Compare
Choose a tag to compare

Fixed a couple bugs:

  • Example output wasn't showing default string values properly
  • The help output wasn't showing the --help, --config, or --example arguments
  • boolean flags were showing a default value, which doesn't really make sense

More parameter types, and params always get listed in same order

20 Sep 02:02
Compare
Choose a tag to compare

Added the following parameter types:

  • RequiredStrParam - Like StrParam, but with no default value. It must be given
  • RequiredIntParam - Similar to RequiredStrParam
  • IntParams - Multiple ints, similar to StrParams

When listing parameters in both the help menu and the example config file, parameters will now always show up in the order they were given.

New option parser and help menu

20 Sep 01:20
Compare
Choose a tag to compare

I wrote a command-line option parser from scratch since goopt just wasn't cutting it. This one lets me know whether or not a variable has actually been set on the command-line or not (rather then just providing the default value), which fixes a couple bugs and simplifies my code a lot. It also means the help menu is supa-sexy now

Basic functionality

19 Sep 20:55
Compare
Choose a tag to compare

Basic flag/configuration file reading implemented for single strings, multiple strings, and integers. Currently relying on goopt but that may change.