Skip to content

Releases: zxdev/env

v1.8.3

14 Jun 16:26

Choose a tag to compare

Naked bool command-line flags

Bool flags can now be given naked on the command line:

  • -tls (alone) sets the field true
  • -tls:off / -tls=false disable it
  • a naked bool no longer swallows the following token, so -tls foo sets tls true and leaves foo as a positional

A pre-scan collects bool field names and env: aliases so the parser knows which bare -flag tokens are presence-only. Existing -name value / -name=value / -name:value forms are unchanged for non-bool fields.

Includes tests and updated readme docs.

v1.8.2

12 Jun 05:13

Choose a tag to compare

Add float support to env field parsing.

  • New f type code shown in command help for float32/float64 fields
  • setField parses floats via strconv.ParseFloat with invalid-input warnings
  • default: tags honored for float fields in conf.go
  • Example pull command gains a -r/rate float64 flag

v1.8.1

12 Jun 04:49

Choose a tag to compare

Help output reformatted to go-tool style

  • Top-level menu now renders like go help: a Usage: block, a tab-indented "The commands are:" list, and a "Use "prog help "" footer.
  • Per-command help shows a terse columnar flag table: name · alias · [type] · [ore*] attrs · (default) · help, all on one line.
  • version is now a one-line banner.
  • Example rewritten to demonstrate env.Commands dispatch with a graceful serve subcommand; readme updated to match.

v1.8.0

12 Jun 03:32
c961dc2

Choose a tag to compare

Harden and modernize moves from GO v1.15 to v1.26
Resolved outstanding issues and added a subcommand system.

v1.7.10

18 Dec 06:23
3e3d112

Choose a tag to compare

Add Conf function for populating a json configuration file with default structure values that can then be overloaded by a file source.

v1.7.9

20 Aug 00:18

Choose a tag to compare

fix error passing zero params to NewENV

v1.7.8

16 Aug 01:14

Choose a tag to compare

fix help output

v1.7.7

09 Aug 16:20

Choose a tag to compare

v1.7.6

08 Aug 22:36
be8ddb4

Choose a tag to compare

fix env.Shutdown onInterrupt

v1.7.5

17 Jul 18:00

Choose a tag to compare

add -log:on|off timestamp controller