(typ *sppb.Type)
| 375 | } |
| 376 | |
| 377 | func formatTypeSimple(typ *sppb.Type) string { |
| 378 | switch code := typ.GetCode(); code { |
| 379 | case sppb.TypeCode_ARRAY: |
| 380 | return fmt.Sprintf("ARRAY<%v>", formatTypeSimple(typ.GetArrayElementType())) |
| 381 | default: |
| 382 | if name, ok := sppb.TypeCode_name[int32(code)]; ok { |
| 383 | return name |
| 384 | } else { |
| 385 | return "UNKNOWN" |
| 386 | } |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | func formatTypeVerbose(typ *sppb.Type) string { |
| 391 | switch code := typ.GetCode(); code { |