miller/pkg/lib
Stephen Kitt f0a7c5832f
Performance and style fixes (#1981)
* Switch to integer ranges in for loops

Signed-off-by: Stephen Kitt <steve@sk2.org>

* Switch to slices functions where appropriate

A number of utility functions can be replaced outright; since Miller
can technically be used as a library, these are deprecated rather than
removed. go:fix directives ensure that they can be replaced
automatically.

Signed-off-by: Stephen Kitt <steve@sk2.org>

* Switch to reflect.TypeFor

This is slightly more efficient than TypeOf when the type is known at
compile time.

Signed-off-by: Stephen Kitt <steve@sk2.org>

* Switch to strings.SplitSeq instead of strings.Split

SplitSeq results in fewer allocations.

Signed-off-by: Stephen Kitt <steve@sk2.org>

* Drop obsolete build directives

Signed-off-by: Stephen Kitt <steve@sk2.org>

* Use min/max instead of explicit comparisons

Signed-off-by: Stephen Kitt <steve@sk2.org>

* Append slices instead of looping

Signed-off-by: Stephen Kitt <steve@sk2.org>

---------

Signed-off-by: Stephen Kitt <steve@sk2.org>
2026-02-18 09:19:31 -05: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 Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
getoptify.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05: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 Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -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 Performance and style fixes (#1981) 2026-02-18 09:19:31 -05:00

These are basic library routines for Miller.