miller/pkg/lib
John Kerl d56eafff97
Convert if/else-if chains to typed switch statements (staticcheck QF1003) (#2112)
Replaces 100+ if/else-if chains on a single variable with tagged switch
statements across 72 files. The bulk are transformer option-parsing loops
(switch on opt string), plus a handful of value-dispatch sites in mlrval,
dsl/cst, repl, lib, auxents, and bifs. One case (surv.go) required a
labeled break to preserve the loop-exit behavior of the original else branch.

Fixes staticcheck QF1003 findings.

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-06-28 18:27:42 -04:00
..
doc.go Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
docurl.go Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
file_readers.go Convert if/else-if chains to typed switch statements (staticcheck QF1003) (#2112) 2026-06-28 18:27:42 -04:00
getoptify.go Add new tail -n +N, head -n -N options (#2071) 2026-06-21 10:34:16 -04:00
halfpipe.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
latin1.go Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
latin1_test.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
logger.go Improve error propagation (#1975) 2026-02-16 16:48:41 -05:00
mlrmath.go Performance and style fixes (#1981) 2026-02-18 09:19:31 -05:00
ordered_map.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
paragraph.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
rand.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
readfiles.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
README.md Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
regex.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
regex_test.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
stats.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
time.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
time_test.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
tsv_codec.go Convert if/else-if chains to typed switch statements (staticcheck QF1003) (#2112) 2026-06-28 18:27:42 -04:00
tsv_codec_test.go Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
unbackslash.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
unbackslash_test.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
util.go Fix column alignment for wide and combining Unicode chars (#1520, #379) (#2061) 2026-05-17 12:12:54 -04:00

These are basic library routines for Miller.