further table streamlining: work with new table api everywhere

This commit is contained in:
2026-08-09 21:48:03 +02:00
parent b49153bd38
commit 2841a94fe5
27 changed files with 271 additions and 249 deletions

View File

@@ -28,9 +28,9 @@ import (
// stringer returns the string representation of different types of
// values
func stringer(in any) string {
func stringer(cell any) string {
//nolint:gocritic
switch val := in.(type) {
switch val := cell.(type) {
case string:
return val
case bool:
@@ -60,12 +60,13 @@ func stringer(in any) string {
case *types.Float64:
// ignore err here, because types.Float64.MarshalJSON() never returns one
f, _ := val.MarshalJSON()
return string(f)
default:
// Caution: this may cause a panic if the [unknown] type does
// not implement fmt.Stringer. In this case add another case
// to the type switch for it above.
return in.(fmt.Stringer).String()
return cell.(fmt.Stringer).String()
}
}