diff --git a/cmd/cmd_expand_status.go b/cmd/cmd_expand_status.go index 8fe4681..76e768a 100644 --- a/cmd/cmd_expand_status.go +++ b/cmd/cmd_expand_status.go @@ -80,8 +80,8 @@ func runExpandStatus(cmd *cli.Command, args []string) error { return nil } -// toInt converts an interface{} (typically from QueryRows) to int. -func toInt(v interface{}) int { +// toInt converts an any (typically from QueryRows) to int. +func toInt(v any) int { switch n := v.(type) { case int: return n diff --git a/cmd/cmd_live.go b/cmd/cmd_live.go index 49a3e7d..cd7eebf 100644 --- a/cmd/cmd_live.go +++ b/cmd/cmd_live.go @@ -71,7 +71,7 @@ func runLive(cmd *cli.Command, args []string) error { } // sqlScalar extracts the first numeric value from a QuerySQL result. -func sqlScalar(rows []map[string]interface{}) int { +func sqlScalar(rows []map[string]any) int { if len(rows) == 0 { return 0 } diff --git a/cmd/cmd_query.go b/cmd/cmd_query.go index 795c64f..70f2bdf 100644 --- a/cmd/cmd_query.go +++ b/cmd/cmd_query.go @@ -129,7 +129,7 @@ func runQuery(cmd *cli.Command, args []string) error { return nil } -func formatValue(v interface{}) string { +func formatValue(v any) string { if v == nil { return "NULL" } diff --git a/ingest.go b/ingest.go index a5a906c..de894cc 100644 --- a/ingest.go +++ b/ingest.go @@ -362,7 +362,7 @@ func extractIteration(label string) int { return n } -// toFloat64 converts a JSON-decoded interface{} value to float64. +// toFloat64 converts a JSON-decoded any value to float64. // Handles float64 (standard json.Unmarshal), json.Number, and string values. func toFloat64(v any) (float64, bool) { switch val := v.(type) {