runtime.Panic: mv error/Stringer to printany

This commit is contained in:
xushiwei
2024-07-28 20:31:48 +08:00
parent 0d468e0df4
commit 54964629fe
2 changed files with 4 additions and 10 deletions

View File

@@ -96,6 +96,10 @@ func printany(i any) {
print(v)
case string:
print(v)
case error:
print(v.Error())
case interface{ String() string }:
print(v.String())
default:
printanycustomtype(i)
}