miller/pkg/mlrval
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
..
mlrmap.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrmap_accessors.go Performance and style fixes (#1981) 2026-02-18 09:19:31 -05:00
mlrmap_accessors_test.go Implement mlr uniq -x (#1457) 2023-12-23 16:20:11 -05:00
mlrmap_flatten_unflatten.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrmap_json.go Performance and style fixes (#1981) 2026-02-18 09:19:31 -05:00
mlrmap_new_test.go Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
mlrmap_print.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_accessors.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_benchmark_test.go The package version must match the major tag version (#1654) 2024-09-20 12:10:11 -04:00
mlrval_cmp.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_cmp_test.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_collections.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_constants.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_copy.go Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
mlrval_format.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_format_test.go Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
mlrval_get.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_get_test.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_infer.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_infer_test.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_is.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_is_test.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_json.go Performance and style fixes (#1981) 2026-02-18 09:19:31 -05:00
mlrval_new.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_new_test.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_output.go Performance and style fixes (#1981) 2026-02-18 09:19:31 -05:00
mlrval_output_test.go Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
mlrval_sort.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_sort_test.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_type.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_type_test.go Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
mlrval_yaml.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
mlrval_yaml_test.go Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00