Skip to content

go-strictcli@v0.38.0

Choose a tag to compare

@smm-h smm-h released this 01 Oct 18:01
· 127 commits to main since this release

Integer values accept only plain decimal digits with an optional leading minus sign: a plus sign and leading zeros are refused.

Context

The owner ruled one integer form for all three implementations, wherever the framework parses an integer from text (the command line, an environment binding, and config set): 30 and -5 parse, while +30, 030, whitespace, digit separators, and every other form are refused with the existing expected-integer error. Before, Go and TypeScript accepted +30 and 030, and Python also accepted non-ASCII digits. This is breaking, which in 0.x is a minor.

Breaking

  • [go-strictcli] Integer values refuse a plus sign and leading zeros. An int flag, positional argument, environment value, or config set value now accepts only plain decimal digits with an optional leading minus sign: 30 and -5 parse, while +30, 030, and -030 are refused with expected integer, got '<value>' (naming the variable for an environment value). Write 30 instead of +30 or 030.