Repository navigation
v0.1.10
The CLI accepts negative numbers and keeps explicit zero values, large integers stay exact on every surface, and nested default and json:",string" tags follow encoding/json.
- The CLI accepts a negative number as a flag value or positional argument:
--min -5,temp -40 --side right,--ratio -0.5,-1e3. Tools no longer need--or argument rewriting for it. A digit declared as a short flag stays a flag, and-j,-yand other flags are unchanged. A stray negative number now fails withunexpected argument -40rather thanunknown flag -4. - An explicit CLI value equal to the zero value now reaches the operation when its input field has a
defaulttag andomitempty:--level 0,--enabled=false,--label "", a root flag such as--limit 0, and a flag's env var set to0. Before, the default replaced it. HTTP and MCP already kept an explicit0,falseor"". - An
int64oruint64input above 2^53, such as a Telegram message, chat, document or custom emoji ID, now reaches the operation exactly on the CLI, HTTP and MCP.op.(*Entry).Decodeused to read every number asfloat64, so5312241539987020022arrived as5312241539987019776and18446744073709551615failed to decode into auint64.--fieldsoutput likewise keeps such integers exact, paged or not. Numbers written with a fraction or exponent still decode as before, so1.0and1e3still fill an integer field. - Input
defaulttags now apply in nested struct fields, not only in embedded ones, on the CLI, HTTP and MCP. A pointer-to-struct section gets its defaults only when the caller sends it. An omitted section stays nil, so a handler can still tell absent from present. A tool whose input nests a struct withdefaulttags will now see those defaults where it saw zero values. - A
json:",string"tag now follows encoding/json everywhere. The input schema types such a field as a string, and adefaulton it is written as a JSON string ("7", not7). The tag is ignored on slices, maps, structs and pointers to pointers, as encoding/json ignores it. An explicit zero CLI value (--count 0,--enabled=false, an empty<id>) is sent in its quoted form. Each operation under a shared<id>path placeholder uses its own field's tag.