Skip to content

Releases: zxdev/env

v1.8.3

Choose a tag to compare

@zxdev zxdev released this 14 Jun 16:26

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

Choose a tag to compare

@zxdev zxdev released this 12 Jun 05:13

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

Choose a tag to compare

@zxdev zxdev released this 12 Jun 04:49

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

Choose a tag to compare

@zxdev zxdev released this 12 Jun 03:32
c961dc2

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

v1.7.10

Choose a tag to compare

@zxdev zxdev released this 18 Dec 06:23
3e3d112

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

Choose a tag to compare

@zxdev zxdev released this 20 Aug 00:18

fix error passing zero params to NewENV

v1.7.8

Choose a tag to compare

@zxdev zxdev released this 16 Aug 01:14

fix help output

v1.7.7

Choose a tag to compare

@zxdev zxdev released this 09 Aug 16:20

v1.7.6

Choose a tag to compare

@zxdev zxdev released this 08 Aug 22:36
be8ddb4

fix env.Shutdown onInterrupt

v1.7.5

Choose a tag to compare

@zxdev zxdev released this 17 Jul 18:00

add -log:on|off timestamp controller