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

Function formatFunctionInternal

checker/format.go:158–180  ·  view source on GitHub ↗
(resultType T, argTypes []T, isInstance bool, format formatter)

Source from the content-addressed store, hash-verified

156}
157
158func formatFunctionInternal[T any](resultType T, argTypes []T, isInstance bool, format formatter) string {
159 result := ""
160 if isInstance {
161 target := argTypes[0]
162 argTypes = argTypes[1:]
163 result += format(target)
164 result += "."
165 }
166 result += "("
167 for i, arg := range argTypes {
168 if i > 0 {
169 result += ", "
170 }
171 result += format(arg)
172 }
173 result += ")"
174 rt := format(resultType)
175 if rt != "" {
176 result += " -> "
177 result += rt
178 }
179 return result
180}
181
182// kindOf returns the kind of the type as defined in the checked.proto.
183func kindOf(t *exprpb.Type) int {

Callers 2

formatFunctionExprTypeFunction · 0.85
formatFunctionDeclTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected