Skip to content

Releases: joseluisq/cline

v1.0.0

03 Jan 12:16
v1.0.0
a065fa9

Choose a tag to compare

This release introduces the first major version v1.0.0.

Breaking changes

Although changes are expected to be minor, existing code needs to be updated.

  • Golang 1.23 is required as a minimum.
  • API is changed.
    • App type is decoupled from the Handler logic, resulting in a new Handler type.
    • Some structs are renamed like Flag types, Flag values, Cmds and helpers.

Refactorings

  • Restructured project modules (files and directories).
  • Improved Tests and code coverage CI, as well as refactored a few APIs.

Improvements

  • Strict UTF-8 for arguments and alphanumeric ASCII for flags and commands.
  • POSIX-compliant support is partially supported (see the limitations).
  • Support for flags termination via -- to provide further positional arguments (tail args).
  • If flag arguments are duplicated (the same argument is used multiple times), then the last argument and value will be taken.
  • Option to restrict the maximum argument length and the maximum number of arguments provided.

Fixes

  • Inconsistent use of aliases for special version and help flags like --v or --h.

For using the new API, please review the examples to adjust your existing apps accordingly.
the ./examples directory.

For more details, see the v1.0.0 milestone and the full changelog v0.1.0...v1.0.0.

v0.1.0

28 Mar 21:24

Choose a tag to compare

v0.1.0 Pre-release
Pre-release

Refactorings

  • af2f02e Help flag display improvements. Which redefine spaces and output style.

Breaking changes

  • 8c2065b Improve flag values, types and helpers. Every flag value type now returns an error during conversion instead of just panic.

Features

  • b21365e Build commit support in --version flag.

Codebase

  • 1a366ec Github Actions as new CI.

Testing

  • ddb3bc5 Test cases for flag values.

v0.1.0-beta.9

06 Dec 22:09

Choose a tag to compare

v0.1.0-beta.9 Pre-release
Pre-release

Refactorings

  • c31151d Flag types and values API improved.

Fixes

  • 8c0761e Wrong bool flag values passed to subommands.

Features

  • 51d02e9 Get provided flags function.
  • 22b81cb Get provided flags with long names function.
  • 2d3c8a1 Get provided flags with short names (alias) function.

Documentation

  • 9fb6a24 Update code example with new API.

v0.1.0-beta.8

30 Nov 12:02

Choose a tag to compare

v0.1.0-beta.8 Pre-release
Pre-release

Refactorings

  • 710aa27 Version flag for global only.

v0.1.0-beta.7

30 Nov 10:50

Choose a tag to compare

v0.1.0-beta.7 Pre-release
Pre-release

Features

  • 8a4eb1d Print default flag values on --help option.
  • b4601e7 Print environment variables for flags on --help option.

Documentation

  • 3231316 Update features section details.

v0.1.0-beta.6

27 Nov 11:50

Choose a tag to compare

v0.1.0-beta.6 Pre-release
Pre-release

Features

  • 966d25e FlagProvided struct for flags passed only from stdin. Available on AppContext.Flags and CmdContext.Flags.

Refactorings

  • 81abd8f Don't print commands information when they are not provided.
  • 5ccfd18 Print long and short flags chars properly on --help option.
  • 966d25e FlagValueMap renamed to FlagMapping.

v0.1.0-beta.5

24 Nov 23:48

Choose a tag to compare

v0.1.0-beta.5 Pre-release
Pre-release

Refactorings

  • 19a506b Dereference tail args slice on app and command contexts.

v0.1.0-beta.4

24 Nov 22:50

Choose a tag to compare

v0.1.0-beta.4 Pre-release
Pre-release

Refactorings

  • 76a9e44 Handle short and long bool flag values.

v0.1.0-beta.3

22 Nov 21:14

Choose a tag to compare

v0.1.0-beta.3 Pre-release
Pre-release
chore: minor testing tweaks

v0.1.0-beta.2

13 Nov 00:38

Choose a tag to compare

v0.1.0-beta.2 Pre-release
Pre-release
refactor: update code examples