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

Method formatTypeUnion

sup/formatter.go:670–683  ·  view source on GitHub ↗
(typ *super.TypeUnion, isComponentType bool)

Source from the content-addressed store, hash-verified

668}
669
670func (f *Formatter) formatTypeUnion(typ *super.TypeUnion, isComponentType bool) {
671 if isComponentType {
672 f.build("(")
673 }
674 for k, typ := range typ.Types {
675 if k > 0 {
676 f.build("|")
677 }
678 f.formatType(typ, true)
679 }
680 if isComponentType {
681 f.build(")")
682 }
683}
684
685func (f *Formatter) formatTypeEnum(typ *super.TypeEnum) {
686 f.build("enum(")

Callers 1

formatTypeBodyMethod · 0.95

Calls 2

buildMethod · 0.95
formatTypeMethod · 0.95

Tested by

no test coverage detected