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.
Apptype is decoupled from theHandlerlogic, resulting in a newHandlertype.- Some structs are renamed like
Flagtypes,Flagvalues,Cmdsand 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
versionandhelpflags like--vor--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.