MCPcopy Create free account
hub / github.com/brimdata/super / FormatType

Function FormatType

sup/formatter.go:734–738  ·  view source on GitHub ↗

FormatType formats a type in canonical form to represent type values as standalone entities.

(typ super.Type)

Source from the content-addressed store, hash-verified

732// FormatType formats a type in canonical form to represent type values
733// as standalone entities.
734func FormatType(typ super.Type) string {
735 var b strings.Builder
736 formatType(&b, make(map[string]*super.TypeNamed), typ, false)
737 return b.String()
738}
739
740func formatType(b *strings.Builder, typedefs map[string]*super.TypeNamed, typ super.Type, isComponentType bool) {
741 switch t := typ.(type) {

Callers 15

semTypeMethod · 0.92
booleanMethod · 0.92
integerMethod · 0.92
numberMethod · 0.92
inMethod · 0.92
plusMethod · 0.92
NewLiteralCastFunction · 0.92
evalMethod · 0.92
errCastFailedFunction · 0.92
EvalMethod · 0.92
EvalMethod · 0.92
EvalMethod · 0.92

Calls 2

formatTypeFunction · 0.85
StringMethod · 0.65

Tested by 2

BenchmarkSortFunction · 0.74