MCPcopy Create free account
hub / github.com/cloudspannerecosystem/spanner-cli / formatTypeSimple

Function formatTypeSimple

decoder.go:377–388  ·  view source on GitHub ↗
(typ *sppb.Type)

Source from the content-addressed store, hash-verified

375}
376
377func 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
390func formatTypeVerbose(typ *sppb.Type) string {
391 switch code := typ.GetCode(); code {

Callers 1

printResultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected