unify-byte-counts #21

Merged
sashakoshka merged 16 commits from unify-byte-counts into main 2025-10-13 08:49:49 -06:00
Showing only changes of commit f402b46b1c - Show all commits

View File

@@ -125,6 +125,10 @@ func (this *describer) describe(value reflect.Value) {
return
}
value = reflect.ValueOf(value.Interface())
if !value.IsValid() {
this.printf("<invalid>")
return
}
switch value.Kind() {
case reflect.Array, reflect.Slice:
this.printf("[\n")
@@ -155,7 +159,7 @@ func (this *describer) describe(value reflect.Value) {
this.iprintf("\n")
}
this.indent -= 1
this.iprintf("}\n")
this.iprintf("}")
case reflect.Map:
this.printf("map {\n")
this.indent += 1
@@ -168,7 +172,7 @@ func (this *describer) describe(value reflect.Value) {
this.iprintf("\n")
}
this.indent -= 1
this.iprintf("}\n")
this.iprintf("}")
case reflect.Pointer:
this.printf("& ")
this.describe(value.Elem())