MCPcopy Create free account

hub / github.com/expr-lang/expr / functions

Functions2,191 in github.com/expr-lang/expr

↓ 4 callersMethodNotContains
NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element. a.NotContains("Hell
internal/testify/assert/assertion_forward.go:1111
↓ 4 callersFunctionNotEqualValues
NotEqualValues asserts that two objects are not equal even when converted to the same type assert.NotEqualValues(t, obj1, obj2)
internal/testify/assert/assertions.go:865
↓ 4 callersFunctionNotErrorIs
NotErrorIs asserts that at none of the errors in err's chain matches target. This is a wrapper for errors.Is.
internal/testify/assert/assertions.go:2040
↓ 4 callersMethodNotRegexp
NotRegexp asserts that a specified regexp does not match a string. a.NotRegexp(regexp.MustCompile("starts"), "it's starting") a.NotRegexp("^start",
internal/testify/assert/assertion_forward.go:1285
↓ 4 callersFunctionPanics
Panics asserts that the code inside the specified PanicTestFunc panics. assert.Panics(t, func(){ GoCrazy() })
internal/testify/require/require.go:1742
↓ 4 callersMethodRegexp
Regexp asserts that a specified regexp matches a string. a.Regexp(regexp.MustCompile("start"), "it's starting") a.Regexp("start...$", "it's not sta
internal/testify/assert/assertion_forward.go:1463
↓ 4 callersMethodReset
(source file.Source)
parser/lexer/lexer.go:54
↓ 4 callersMethodSet
(s string, i int)
test/interface/interface_test.go:20
↓ 4 callersMethodSetLocation
(file.Location)
ast/node.go:17
↓ 4 callersFunctionTypeKind
(t reflect.Type, k reflect.Kind)
internal/deref/deref.go:49
↓ 4 callersMethodacceptRun
(valid string)
parser/lexer/lexer.go:153
↓ 4 callersFunctionchangeKind
changeKind uses unsafe to intentionally change the kind of a reflect.Value to the maximum kind value which does not exist. This is needed to test the
internal/spew/internalunsafe_test.go:40
↓ 4 callersFunctioncleanUpTempFiles
(paths []string)
internal/testify/assert/assertions_test.go:2119
↓ 4 callersFunctionhttpCode
httpCode is a helper that returns HTTP code of the response. It returns -1 and an error if building a new request fails.
internal/testify/assert/http_assertions.go:13
↓ 4 callersMethodisBJunk
(s string)
internal/difflib/difflib.go:192
↓ 4 callersFunctionisOrdered
isOrdered checks that collection contains orderable elements.
internal/testify/assert/assertion_order.go:9
↓ 4 callersFunctionmax
(a, b int)
internal/difflib/difflib.go:33
↓ 4 callersFunctionprintComplex
printComplex outputs a complex value using the specified float precision for the real and imaginary parts to Writer w.
internal/spew/common.go:170
↓ 4 callersFunctionprintFloat
printFloat outputs a floating point value using the specified precision, which is expected to be 32 or 64bit, to Writer w.
internal/spew/common.go:164
↓ 4 callersFunctionprintInt
printInt outputs a signed integer value to Writer w.
internal/spew/common.go:153
↓ 4 callersFunctionredirStdout
redirStdout is a helper function to return the standard output from f as a byte slice.
internal/spew/spew_test.go:109
↓ 4 callersMethodscanDigits
returns lower-case ch iff ch is ASCII letter
parser/lexer/lexer.go:192
↓ 4 callersMethodskip
()
parser/lexer/lexer.go:137
↓ 4 callersFunctiontoFloat
(x interface{})
internal/testify/assert/assertions.go:1320
↓ 4 callersMethodtoIntegerNode
(number int64)
parser/parser.go:553
↓ 4 callersFunctiontoString
(n Node)
optimizer/fold.go:313
↓ 4 callersFunctionunhex
(b byte)
parser/lexer/utils.go:339
↓ 4 callersMethodunpackValue
unpackValue returns values inside of non-nil interfaces when possible and ensures that types for values which have been unpacked from an interface are
internal/spew/format.go:94
↓ 4 callersMethodunpackValue
unpackValue returns values inside of non-nil interfaces when possible. This is useful for data types like structs, arrays, slices, and maps which can
internal/spew/dump.go:73
↓ 4 callersFunctionvalidateAggregateFunc
(name string, args []reflect.Type)
builtin/validation.go:10
↓ 3 callersFunctionAsKind
AsKind tells the compiler to expect kind of the result.
expr.go:73
↓ 3 callersFunctionDisableAllBuiltins
DisableAllBuiltins disables all builtins.
expr.go:174
↓ 3 callersMethodDisassembleWriter
DisassembleWriter takes a writer and writes opcodes to it.
vm/program.go:85
↓ 3 callersFunctionEmpty
Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either a slice or a channel with len == 0. assert.Empty(t, obj)
internal/testify/require/require.go:125
↓ 3 callersMethodEnqueue
Enqueue adds an item to the ring.
internal/ring/ring.go:60
↓ 3 callersFunctionEnvWithCache
(c *Cache, env any)
conf/env.go:19
↓ 3 callersMethodEqualError
EqualError asserts that a function returned an error (i.e. not `nil`) and that it is equal to the provided error. actualObj, err := SomeFunction()
internal/testify/assert/assertion_forward.go:136
↓ 3 callersFunctionEqualValues
EqualValues asserts that two objects are equal or convertible to the same types and equal. assert.EqualValues(t, uint32(123), int32(123))
internal/testify/assert/assertions.go:583
↓ 3 callersFunctionErrorContains
ErrorContains asserts that a function returned an error (i.e. not `nil`) and that the error contains the specified substring. actualObj, err := Some
internal/testify/require/require.go:326
↓ 3 callersFunctionErrorf
Errorf asserts that a function returned an error (i.e. not `nil`). actualObj, err := SomeFunction() if assert.Errorf(t, err, "error message %s"
internal/testify/assert/assertion_format.go:124
↓ 3 callersFunctionExactly
Exactly asserts that two objects are equal in value and type. assert.Exactly(t, int32(123), int64(123))
internal/testify/require/require.go:478
↓ 3 callersMethodFailNow
()
internal/testify/assert/assertions.go:321
↓ 3 callersFunctionFloat
(x any)
builtin/lib.go:195
↓ 3 callersMethodFormat
Format satisfies the fmt.Formatter interface. See NewFormatter for usage details.
internal/spew/format.go:371
↓ 3 callersFunctionFromType
FromType calls FromType on a nil *Cache. See the comment on Cache.
checker/nature/nature.go:203
↓ 3 callersMethodHTTPBodyContains
HTTPBodyContains asserts that a specified handler returns a body that contains a string. a.HTTPBodyContains(myHandler, "GET", "www.google.com", nil,
internal/testify/assert/assertion_forward.go:529
↓ 3 callersMethodHTTPBodyNotContains
HTTPBodyNotContains asserts that a specified handler returns a body that does not contain a string. a.HTTPBodyNotContains(myHandler, "GET", "www.goo
internal/testify/assert/assertion_forward.go:555
↓ 3 callersMethodHTTPError
HTTPError asserts that a specified handler returns an error status code. a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}
internal/testify/assert/assertion_forward.go:580
↓ 3 callersMethodHTTPRedirect
HTTPRedirect asserts that a specified handler returns a redirect status code. a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b
internal/testify/assert/assertion_forward.go:604
↓ 3 callersMethodHTTPSuccess
HTTPSuccess asserts that a specified handler returns a success status code. a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) Returns
internal/testify/assert/assertion_forward.go:652
↓ 3 callersFunctionInDelta
InDelta asserts that the two numerals are within delta of each other. assert.InDelta(t, math.Pi, 22/7.0, 0.01)
internal/testify/require/require.go:870
↓ 3 callersMethodIsAnyOf
(cs ...NatureCheck)
checker/nature/nature.go:530
↓ 3 callersFunctionIsBoolean
(op string)
parser/operator/operator.go:19
↓ 3 callersMethodItem
Item returns the current element from the scope using fast paths when available.
vm/utils.go:31
↓ 3 callersFunctionLex
Lex will buffer and return the tokens of a disposable *[Lexer].
parser/lexer/lexer.go:16
↓ 3 callersFunctionMaxNodes
MaxNodes sets the maximum number of nodes allowed in the expression. By default, the maximum number of nodes is conf.DefaultMaxNodes. If MaxNodes is s
expr.go:222
↓ 3 callersFunctionMethodIndex
(c *Cache, env Nature, node ast.Node)
checker/info.go:30
↓ 3 callersMethodNature
()
types/types.go:13
↓ 3 callersFunctionNatureOf
NatureOf calls NatureOf on a nil *Cache. See the comment on Cache.
checker/nature/nature.go:197
↓ 3 callersFunctionNewDefaultConfig
NewDefaultConfig returns a ConfigState with the following default settings. Indent: " " MaxDepth: 0 DisableMethods: false DisablePointerMethods:
internal/spew/config.go:304
↓ 3 callersFunctionNewMatcherWithJunk
(a, b []string, autoJunk bool, isJunk func(string) bool)
internal/difflib/difflib.go:106
↓ 3 callersMethodNext
()
parser/lexer/lexer.go:60
↓ 3 callersFunctionNotContains
NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element. assert.NotContains(
internal/testify/require/require.go:1407
↓ 3 callersFunctionNotEmpty
NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either a slice or a channel with len == 0. if assert.NotEmpt
internal/testify/require/require.go:1439
↓ 3 callersFunctionNotEqual
NotEqual asserts that the specified values are NOT equal. assert.NotEqual(t, obj1, obj2) Pointer variable equality is determined based on the equal
internal/testify/require/require.go:1471
↓ 3 callersFunctionNotPanics
NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. assert.NotPanics(t, func(){ RemainCalm() })
internal/testify/require/require.go:1602
↓ 3 callersFunctionNotZero
NotZero asserts that i is not the zero value for its type.
internal/testify/require/require.go:1718
↓ 3 callersFunctionParseCheck
ParseCheck parses input expression and checks its types. Also, it applies all provided patchers. In case of error, it returns error with a tree.
checker/checker.go:34
↓ 3 callersMethodPromoteNumericNature
(c *Cache, rhs Nature)
checker/nature/nature.go:480
↓ 3 callersMethodReset
()
internal/ring/ring.go:29
↓ 3 callersMethodSub
(a, b float64)
test/playground/env.go:139
↓ 3 callersFunctionTimezone
Timezone sets default timezone for date() and now() builtin functions.
expr.go:209
↓ 3 callersFunctionToFloat64
(a any)
vm/runtime/runtime.go:385
↓ 3 callersFunctionTypedFuncIndex
(fn reflect.Type, method bool)
checker/info.go:51
↓ 3 callersMethodUnwrap
()
file/error.go:66
↓ 3 callersFunctionWithinDuration
WithinDuration asserts that the two times are within duration delta of each other. assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second)
internal/testify/require/require.go:1970
↓ 3 callersFunctionZero
Zero asserts that i is the zero value for its type.
internal/testify/require/require.go:2020
↓ 3 callersFunctionassertAlmostEqual
(t *testing.T, a, b float64, places int)
internal/difflib/difflib_test.go:12
↓ 3 callersFunctionbuildErrorChainString
(err error)
internal/testify/assert/assertions.go:2079
↓ 3 callersFunctioncalculateRatio
(matches, length int)
internal/difflib/difflib.go:40
↓ 3 callersFunctioncases
(op string, xs ...[]string)
vm/runtime/helpers/main.go:58
↓ 3 callersFunctioncheck
(err error)
debug/debugger.go:200
↓ 3 callersMethodcheckArguments
( name string, fn Nature, arguments []ast.Node, node ast.Node, )
checker/checker.go:1050
↓ 3 callersMethodcommit
()
parser/lexer/lexer.go:75
↓ 3 callersFunctioncontainsValue
(values []compareResult, value compareResult)
internal/testify/assert/assertion_compare.go:481
↓ 3 callersMethodemitCond
(body func())
compiler/compiler.go:1183
↓ 3 callersMethodemitLocation
(loc file.Location, op Opcode, arg int)
compiler/compiler.go:114
↓ 3 callersMethodfinished
()
checker/nature/utils.go:34
↓ 3 callersFunctiongetLen
getLen tries to get the length of an object. It returns (0, false) if impossible.
internal/testify/assert/assertions.go:782
↓ 3 callersFunctionhandleMethods
handleMethods attempts to call the Error and String methods on the underlying type the passed reflect.Value represents and outputs the result to Write
internal/spew/common.go:85
↓ 3 callersFunctionhelpTestSortValues
(tests []sortTestCase, cs *spew.ConfigState, t *testing.T)
internal/spew/common_test.go:134
↓ 3 callersFunctionisPrivate
(s string)
docgen/docgen.go:257
↓ 3 callersFunctionisProtobuf
(s string)
docgen/docgen.go:261
↓ 3 callersFunctionisTest
Stolen from the `go test` tool. isTest tells whether name looks like a test (or benchmark, according to prefix). It is a Test (say) if there is a char
internal/testify/assert/assertions.go:273
↓ 3 callersFunctionlower
(ch rune)
parser/lexer/lexer.go:190
↓ 3 callersFunctionnewFormatter
newFormatter is a helper function to consolidate the logic from the various public methods which take varying config states.
internal/spew/format.go:394
↓ 3 callersMethodparseArguments
(arguments []Node)
parser/parser.go:647
↓ 3 callersMethodparseCall
(token Token, arguments []Node, checkOverrides bool)
parser/parser.go:569
↓ 3 callersFunctionsamePointers
samePointers compares two generic interface objects and returns whether they point to the same object
internal/testify/assert/assertions.go:533
↓ 3 callersFunctionsortValues
sortValues is a sort function that handles both native types and any type that can be converted to error or Stringer. Other inputs are sorted accordi
internal/spew/common.go:336
← previousnext →301–400 of 2,191, ranked by callers