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

Function isListLiteralWithNumericArgs

ext/math.go:946–961  ·  view source on GitHub ↗
(arg ast.Expr)

Source from the content-addressed store, hash-verified

944}
945
946func isListLiteralWithNumericArgs(arg ast.Expr) bool {
947 switch arg.Kind() {
948 case ast.ListKind:
949 list := arg.AsList()
950 if list.Size() == 0 {
951 return false
952 }
953 for _, e := range list.Elements() {
954 if !isNumericArgType(e) {
955 return false
956 }
957 }
958 return true
959 }
960 return false
961}
962
963func maybeSuffixError(val ref.Val, suffix string) ref.Val {
964 if types.IsError(val) {

Callers 2

mathLeastFunction · 0.85
mathGreatestFunction · 0.85

Calls 5

isNumericArgTypeFunction · 0.85
KindMethod · 0.65
AsListMethod · 0.65
SizeMethod · 0.65
ElementsMethod · 0.65

Tested by

no test coverage detected