Movatterモバイル変換


[0]ホーム

URL:


operators

package
v0.26.1Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2025 License:Apache-2.0, BSD-3-ClauseImports:0Imported by:95

Details

Repository

github.com/google/cel-go

Links

Documentation

Overview

Package operators defines the internal function names of operators.

All operators in the expression language are modelled as function calls.

Index

Constants

View Source
const (// Symbolic operators.Conditional   = "_?_:_"LogicalAnd    = "_&&_"LogicalOr     = "_||_"LogicalNot    = "!_"Equals        = "_==_"NotEquals     = "_!=_"Less          = "_<_"LessEquals    = "_<=_"Greater       = "_>_"GreaterEquals = "_>=_"Add           = "_+_"Subtract      = "_-_"Multiply      = "_*_"Divide        = "_/_"Modulo        = "_%_"Negate        = "-_"Index         = "_[_]"OptIndex      = "_[?_]"OptSelect     = "_?._"// Macros, must have a valid identifier.Has       = "has"All       = "all"Exists    = "exists"ExistsOne = "exists_one"Map       = "map"Filter    = "filter"// Named operators, must not have be valid identifiers.NotStrictlyFalse = "@not_strictly_false"In               = "@in"// Deprecated: named operators with valid identifiers.OldNotStrictlyFalse = "__not_strictly_false__"OldIn               = "_in_")

String "names" for CEL operators.

Variables

This section is empty.

Functions

funcArityadded inv0.12.2

func Arity(symbolstring)int

Arity returns the number of argument the operator takes-1 is returned if an undefined symbol is provided

funcFind

func Find(textstring) (string,bool)

Find the internal function name for an operator, if the input text is one.

funcFindReverseadded inv0.3.0

func FindReverse(symbolstring) (string,bool)

FindReverse returns the unmangled, text representation of the operator.

funcFindReverseBinaryOperatoradded inv0.3.1

func FindReverseBinaryOperator(symbolstring) (string,bool)

FindReverseBinaryOperator returns the unmangled, text representation of a binary operator.

If the symbol does refer to an operator, but the operator does not have a display name theresult is false.

funcPrecedenceadded inv0.3.0

func Precedence(symbolstring)int

Precedence returns the operator precedence, where the higher the number indicateshigher precedence operations.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp