Skip to content

Tags: peterbourgon/ff

Tags

v4.0.0-beta.1

Toggle v4.0.0-beta.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Make partial success of FlagSet.Parse possible (#155)

* Parse: mark as parsed, even on error

* UnknownFlagError

v4.0.0-alpha.4

Toggle v4.0.0-alpha.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
v4.0.0-alpha.4 (#122)

* Default value updates

* FlagSet struct tests

* Parse test failing (#118)

* Parse test passing (#118)

* WithFilesystem takes iofs.FS (#119)

* doc.go: fixup

* README: tweaks

* Tweaks

* Tweak

* Tweaks and more tests

v4.0.0-alpha.3

Toggle v4.0.0-alpha.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
v4-alpha.3 (#117)

* bool flag changes

* Major retooling

* Add Rewrap

* Rework testing and constructors

* Improve run-action-tests

v4.0.0-alpha.2

Toggle v4.0.0-alpha.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
v4-alpha.2 (#114)

* ffhelp: refactor default sections

* Huge WIP

* README: fixes and tweaks

* FlagSetAny

* Iteration

* Fix for CI

* Major continued refactoring

* Minor updates

* Improvements

* WIP

* WIP

* WIP

* ffenv: fix typo

* ffjson, fftoml: fix the same typo

* Comment cleanup

v4.0.0-alpha.1

Toggle v4.0.0-alpha.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
v4.0.0-alpha.1 (#113)

* Initial commit of ff v4 (rebase 1)

* Experiment: rename FlagSet to Flags

* examples/objectctl: add a test case

* Comment updates

* Fix comment

* Comment updates

* examples/textctl: minor changes to var names

* Minor renames to ParseContext fields

* Tweaks

* README updates

* ffhelp: overhaul

* Tweaks and renames

* Minor tweak

* ExampleParse_help

* README updates

* README updates

* Comment updates

* ffbasic + support

* internal: ffdata

* Cleanup

* Comment fixes

v3.4.0

Toggle v3.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
JSON, TOML, YAML: support for nested config data (#112)

* internal: add TraverseMap

* gofumpt

* JSONParseConfig

* internal: TraverseMap: map[any]any

* fftoml: don't break the API

* internal: TraverseMap: test for map[any]any

* fftest, ffyaml: nested node tests

* Can't remove ParseError types

* Can't remove StringConversionError type

v3.3.2

Toggle v3.3.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
WithFilesystem (#110)

* WithFilesystem

* configFileLookup was unused

* options.go was unused

* json[_test].go -> json_parser[_test].go

v3.3.1

Toggle v3.3.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
ffcli.DefaultUsageFunc: Support flag help placeholders (#106)

(This is an arguably uncontroversial part of the proposal in #105.
Its's a new feature, not a significant change in behavior.)

Currently, ffcli.DefaultUsageFunc prints "..." for any flag
that does not have a default value specified.
This produces less-than-effective help from DefaultUsageFunc.

This change retains the behavior of printing the default value as-is,
but if a default value is not provided,
it allows users to provide placeholder text
by wrapping a word inside the help text for a flag in backticks.

For example, given the following:

    fset.String("c", "" /* default */, "path to `config` file")

We'll get:

    -c config  path to config file

This matches the behavior of FlagSet.PrintDefaults,
and indeed it relies on the same flag.UnquoteUsage machinery for this.

This also has the nice side-effect of making a reasonable guess
at an alternative placeholder text instead of "...". For example:

    fset.Int("n", "" /* default */, "number of items")

    // Before: -n ...  number of items
    // Now:    -n int  number of items

Note that as implemented right now, the user supplied placeholder will
be used only if a non-zero default value was not supplied.
This was an attempt to retain as much of the existing behavior.
The proposal in #105, if you're open to it,
would change more of the output.

v3.3.0

Toggle v3.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Attempt fixes for go 1.19 (#98)

* Attempt fixes

* fftoml: fix?

* Fixes

v3.2.0-rc.1

Toggle v3.2.0-rc.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add a naïve parser for .env files (#89)

* Add a naïve parser for .env files

* Remove dead code

* Cleanup