unkinben 8696097a6a
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
Accept match value positionally so -pm <value> works
pflag does not attach a space-separated value to a string flag that is grouped
with a bool flag, so `node-lookup -R -pm k8s` parsed -p and left `k8s` as a
stray positional, failing with "unknown command k8s". Only `-pm=k8s` or the
un-grouped `-p -m k8s` worked, which is surprising.

- Allow one positional argument (cobra.MaximumNArgs(1)) and fall back to it for
  the match value when -m is empty (matchValue()), so -pm/-im/-ipm <value> and
  a bare `-p <value>` all work. -m still wins when both are given.
- Add matchValue unit tests.
- Document the positional value and the pflag grouping quirk in AGENTS.md.
2026-07-05 17:02:25 +10:00
S
Description
A CLI tool written in Go that queries the PuppetDB API to look up and filter node facts.
187 KiB
v0.5.0 Latest
2026-03-26 15:29:45 +11:00
Languages
Go 91.8%
Makefile 4.8%
Shell 3.4%