func celMatcherStringMacroExpander(funcName string) parser.MacroExpander {
	return func(eh parser.ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) {
		if len(args) != 1 {
			return nil, &common.Error{
				Message: "matcher requires one argument",
			}
		}
		if isCELStringExpr(args[0]) {
			return eh.GlobalCall(funcName, eh.Ident("request"), args[0]), nil
		}
		return nil, &common.Error{
			Location: eh.OffsetLocation(args[0].GetId()),
			Message:  "matcher argument must be a string literal",
		}
	}
}
// celMatcherStringMacroExpander validates that the macro is called a single
// string argument.
//
// The following function call is returned: <funcName>(request, arg)
celMatcherStringMacroExpander validates that the macro is called a single
string argument.

The following function call is returned: (request, arg)
// celMatcherStringMacroExpander validates that the macro is called a single // string argument . // // The following function call is returned : <funcName > ( request arg )
func celMatcherStringMacroExpander(funcName string) parser.MacroExpander {
	return func(eh parser.ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) {
		if len(args) != 1 {
			return nil, &common.Error{
				Message: "matcher requires one argument",
			}
		}
		if isCELStringExpr(args[0]) {
			return eh.GlobalCall(funcName, eh.Ident("request"), args[0]), nil
		}
		return nil, &common.Error{
			Location: eh.OffsetLocation(args[0].GetId()),
			Message:  "matcher argument must be a string literal",
		}
	}
}
func celMatcherStringMacroExpander ( funcName string ) parser . MacroExpander { return func ( eh parser . ExprHelper , target * exprpb . Expr , args [ ] * exprpb . Expr ) ( * exprpb . Expr , * common . Error ) { if len ( args ) != 1 { return nil , & common . Error { Message : " " , } } if isCELStringExpr ( args [ 0 ] ) { return eh . GlobalCall ( funcName , eh . Ident ( " " ) , args [ 0 ] ) , nil } return nil , & common . Error { Location : eh . OffsetLocation ( args [ 0 ] . GetId ( ) ) , Message : " " , } } }
celMatcherStringMacroExpander validates that the macro is called a single
string argument.
celMatcherStringMacroExpander validates that the macro is called a single string argument .