MCPcopy Create free account
hub / github.com/cel-expr/cel-go / formatSpecifierImpl

Function formatSpecifierImpl

common/env/env.go:854–873  ·  view source on GitHub ↗
(td *TypeDesc, sb *strings.Builder)

Source from the content-addressed store, hash-verified

852}
853
854func formatSpecifierImpl(td *TypeDesc, sb *strings.Builder) {
855 if td.IsTypeParam {
856 sb.WriteRune('~')
857 sb.WriteString(td.TypeName)
858 return
859 }
860 sb.WriteString(td.TypeName)
861 l := len(td.Params)
862 if l < 1 {
863 return
864 }
865 sb.WriteRune('<')
866 for i, p := range td.Params {
867 formatSpecifierImpl(p, sb)
868 if i < l-1 {
869 sb.WriteString(", ")
870 }
871 }
872 sb.WriteRune('>')
873}
874
875// SpecifierFormat returns the short text representation of the type. e.g. "map<string, int>"
876func (td *TypeDesc) SpecifierFormat() string {

Callers 1

SpecifierFormatMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected