MCPcopy Create free account

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

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

↓ 3 callersFunctiontoInt
(val any)
builtin/utils.go:44
↓ 3 callersFunctionunsafeReflectValue
unsafeReflectValue converts the passed reflect.Value into a one that bypasses the typical safety restrictions preventing access to unaddressable and u
internal/spew/bypass.go:94
↓ 3 callersFunctionvalidateRoundFunc
(name string, args []reflect.Type)
builtin/validation.go:28
↓ 2 callersFunctionAsInt
AsInt tells the compiler to expect an int result.
expr.go:89
↓ 2 callersMethodBar
()
test/interface/interface_method_test.go:13
↓ 2 callersFunctionCallerInfo
* CallerInfo is necessary because the assert functions use the testing object internally, causing it to print the file:line of the assert method, rath
internal/testify/assert/assertions.go:210
↓ 2 callersMethodCap
()
internal/ring/ring.go:25
↓ 2 callersMethodCheck
Check checks types of the expression tree. It returns type of the expression and error if any. If config is nil, then default configuration will be us
checker/checker.go:86
↓ 2 callersMethodClear
()
test/coredns/coredns.go:121
↓ 2 callersMethodComparableTo
(c *Cache, rhs Nature)
checker/nature/nature.go:557
↓ 2 callersMethodCompare
(other Post)
test/playground/env.go:56
↓ 2 callersMethodCondition
Condition uses a Comparison to assert a complex condition.
internal/testify/assert/assertion_forward.go:12
↓ 2 callersFunctionConditionf
Conditionf uses a Comparison to assert a complex condition.
internal/testify/assert/assertion_format.go:12
↓ 2 callersMethodConstExpr
(name string)
conf/config.go:76
↓ 2 callersFunctionContainsf
Containsf asserts that the specified string, list(array, slice...) or map contains the specified substring or element. assert.Containsf(t, "Hello Wo
internal/testify/assert/assertion_format.go:25
↓ 2 callersFunctionDebug
()
vm/vm.go:30
↓ 2 callersMethodDequeue
Dequeue returns the oldest value.
internal/ring/ring.go:49
↓ 2 callersFunctionDirExistsf
DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking w
internal/testify/assert/assertion_format.go:34
↓ 2 callersFunctionElementsMatchf
ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified listB(array, slice...) ignoring the order of the elements. If t
internal/testify/assert/assertion_format.go:46
↓ 2 callersMethodEmpty
Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either a slice or a channel with len == 0. a.Empty(obj)
internal/testify/require/require_forward.go:101
↓ 2 callersFunctionEmptyf
Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either a slice or a channel with len == 0. assert.Emptyf(t, obj, "erro
internal/testify/assert/assertion_format.go:57
↓ 2 callersFunctionEnableBuiltin
EnableBuiltin enables builtin function.
expr.go:190
↓ 2 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/require/require_forward.go:138
↓ 2 callersFunctionEqualErrorf
EqualErrorf 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_format.go:83
↓ 2 callersFunctionEqualExportedValuesf
EqualExportedValuesf asserts that the types of two objects are equal and their public fields are also equal. This is useful for comparing structs that
internal/testify/assert/assertion_format.go:100
↓ 2 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/require/require.go:240
↓ 2 callersFunctionEqualValuesf
EqualValuesf asserts that two objects are equal or convertible to the same types and equal. assert.EqualValuesf(t, uint32(123), int32(123), "error m
internal/testify/assert/assertion_format.go:111
↓ 2 callersFunctionEqualf
Equalf asserts that two objects are equal. assert.Equalf(t, 123, 123, "error message %s", "formatted") Pointer variable equality is determined base
internal/testify/assert/assertion_format.go:71
↓ 2 callersFunctionErrorAsf
ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. This is a wrapper for erro
internal/testify/assert/assertion_format.go:133
↓ 2 callersMethodErrorContains
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_forward.go:263
↓ 2 callersFunctionErrorContainsf
ErrorContainsf asserts that a function returned an error (i.e. not `nil`) and that the error contains the specified substring. actualObj, err := Som
internal/testify/assert/assertion_format.go:145
↓ 2 callersFunctionErrorIsf
ErrorIsf asserts that at least one of the errors in err's chain matches target. This is a wrapper for errors.Is.
internal/testify/assert/assertion_format.go:154
↓ 2 callersFunctionEventuallyWithTf
EventuallyWithTf asserts that given condition will be met in waitFor time, periodically checking target function each tick. In contrast to Eventually,
internal/testify/assert/assertion_format.go:190
↓ 2 callersFunctionEventuallyf
Eventuallyf asserts that given condition will be met in waitFor time, periodically checking target function each tick. assert.Eventuallyf(t, func()
internal/testify/assert/assertion_format.go:165
↓ 2 callersMethodExactly
Exactly asserts that two objects are equal in value and type. a.Exactly(int32(123), int64(123))
internal/testify/require/require_forward.go:388
↓ 2 callersFunctionExactlyf
Exactlyf asserts that two objects are equal in value and type. assert.Exactlyf(t, int32(123), int64(123), "error message %s", "formatted")
internal/testify/assert/assertion_format.go:200
↓ 2 callersFunctionFailNowf
FailNowf fails test
internal/testify/assert/assertion_format.go:216
↓ 2 callersFunctionFailf
Failf reports a failure through
internal/testify/assert/assertion_format.go:208
↓ 2 callersMethodFalse
False asserts that the specified value is false. a.False(myBool)
internal/testify/require/require_forward.go:440
↓ 2 callersFunctionFalsef
Falsef asserts that the specified value is false. assert.Falsef(t, myBool, "error message %s", "formatted")
internal/testify/assert/assertion_format.go:226
↓ 2 callersFunctionFetchField
(from any, field *Field)
vm/runtime/runtime.go:109
↓ 2 callersFunctionFetchMethod
(from any, method *Method)
vm/runtime/runtime.go:151
↓ 2 callersMethodFieldIndex
(c *Cache, name string)
checker/nature/nature.go:423
↓ 2 callersFunctionFileExistsf
FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check
internal/testify/assert/assertion_format.go:235
↓ 2 callersFunctionFind
(node Node, fn func(node Node) bool)
ast/find.go:3
↓ 2 callersMethodFprint
Fprint is a wrapper for fmt.Fprint that treats each argument as if it were passed with a Formatter interface returned by c.NewFormatter. It returns t
internal/spew/config.go:127
↓ 2 callersMethodFprintln
Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it passed with a Formatter interface returned by c.NewFormatter. See NewFormat
internal/spew/config.go:150
↓ 2 callersFunctionFunc
()
test/fuzz/fuzz_env.go:34
↓ 2 callersMethodGetMatchingBlocks
Return list of triples describing matching subsequences. Each triple is of the form (i, j, n), and means that a[i:i+n] == b[j:j+n]. The triples are
internal/difflib/difflib.go:308
↓ 2 callersFunctionGreater
Greater asserts that the first element is greater than the second assert.Greater(t, 2, 1) assert.Greater(t, float64(2), float64(1)) assert.Greater
internal/testify/require/require.go:600
↓ 2 callersFunctionGreaterOrEqualf
GreaterOrEqualf asserts that the first element is greater than or equal to the second assert.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted
internal/testify/assert/assertion_format.go:260
↓ 2 callersFunctionGreaterf
Greaterf asserts that the first element is greater than the second assert.Greaterf(t, 2, 1, "error message %s", "formatted") assert.Greaterf(t, flo
internal/testify/assert/assertion_format.go:247
↓ 2 callersFunctionHTTPBody
HTTPBody is a helper that returns HTTP body of the response. It returns empty string if building a new request fails.
internal/testify/assert/http_assertions.go:114
↓ 2 callersFunctionHTTPBodyContainsf
HTTPBodyContainsf asserts that a specified handler returns a body that contains a string. assert.HTTPBodyContainsf(t, myHandler, "GET", "www.google.
internal/testify/assert/assertion_format.go:273
↓ 2 callersFunctionHTTPBodyNotContainsf
HTTPBodyNotContainsf asserts that a specified handler returns a body that does not contain a string. assert.HTTPBodyNotContainsf(t, myHandler, "GET"
internal/testify/assert/assertion_format.go:286
↓ 2 callersFunctionHTTPErrorf
HTTPErrorf asserts that a specified handler returns an error status code. assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string
internal/testify/assert/assertion_format.go:298
↓ 2 callersFunctionHTTPRedirectf
HTTPRedirectf asserts that a specified handler returns a redirect status code. assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": [
internal/testify/assert/assertion_format.go:310
↓ 2 callersFunctionHTTPStatusCodef
HTTPStatusCodef asserts that a specified handler returns a specified status code. assert.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil
internal/testify/assert/assertion_format.go:322
↓ 2 callersFunctionHTTPSuccessf
HTTPSuccessf asserts that a specified handler returns a success status code. assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil,
internal/testify/assert/assertion_format.go:334
↓ 2 callersFunctionImplementsf
Implementsf asserts that an object is implemented by the specified interface. assert.Implementsf(t, (*MyInterface)(nil), new(MyObject), "error messa
internal/testify/assert/assertion_format.go:344
↓ 2 callersMethodInDelta
InDelta asserts that the two numerals are within delta of each other. a.InDelta(math.Pi, 22/7.0, 0.01)
internal/testify/require/require_forward.go:696
↓ 2 callersFunctionInDeltaMapValuesf
InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
internal/testify/assert/assertion_format.go:362
↓ 2 callersFunctionInDeltaSlicef
InDeltaSlicef is the same as InDelta, except it compares two slices.
internal/testify/assert/assertion_format.go:370
↓ 2 callersFunctionInDeltaf
InDeltaf asserts that the two numerals are within delta of each other. assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted")
internal/testify/assert/assertion_format.go:354
↓ 2 callersMethodInEpsilon
InEpsilon asserts that expected and actual have a relative error less than epsilon
internal/testify/assert/assertion_forward.go:744
↓ 2 callersFunctionInEpsilonSlicef
InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices.
internal/testify/assert/assertion_format.go:386
↓ 2 callersFunctionInEpsilonf
InEpsilonf asserts that expected and actual have a relative error less than epsilon
internal/testify/assert/assertion_format.go:378
↓ 2 callersFunctionIsAlphabetic
(r rune)
parser/utils/utils.go:32
↓ 2 callersFunctionIsComparison
(op string)
parser/operator/operator.go:67
↓ 2 callersFunctionIsDecreasingf
IsDecreasingf asserts that the collection is decreasing assert.IsDecreasingf(t, []int{2, 1, 0}, "error message %s", "formatted") assert.IsDecreasin
internal/testify/assert/assertion_format.go:398
↓ 2 callersFunctionIsIncreasingf
IsIncreasingf asserts that the collection is increasing assert.IsIncreasingf(t, []int{1, 2, 3}, "error message %s", "formatted") assert.IsIncreasin
internal/testify/assert/assertion_format.go:410
↓ 2 callersMethodIsMap
()
checker/nature/nature.go:514
↓ 2 callersFunctionIsNonDecreasingf
IsNonDecreasingf asserts that the collection is not decreasing assert.IsNonDecreasingf(t, []int{1, 1, 2}, "error message %s", "formatted") assert.I
internal/testify/assert/assertion_format.go:422
↓ 2 callersFunctionIsNonIncreasingf
IsNonIncreasingf asserts that the collection is not increasing assert.IsNonIncreasingf(t, []int{2, 1, 1}, "error message %s", "formatted") assert.I
internal/testify/assert/assertion_format.go:434
↓ 2 callersMethodIsType
IsType asserts that the specified objects are of the same type.
internal/testify/assert/assertion_forward.go:872
↓ 2 callersMethodIsType
IsType asserts that the specified objects are of the same type.
internal/testify/require/require_forward.go:874
↓ 2 callersFunctionIsTypef
IsTypef asserts that the specified objects are of the same type.
internal/testify/assert/assertion_format.go:442
↓ 2 callersMethodIsZero
()
test/playground/env.go:69
↓ 2 callersFunctionJSONEqf
JSONEqf asserts that two JSON strings are equivalent. assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "err
internal/testify/assert/assertion_format.go:452
↓ 2 callersMethodLen
()
internal/ring/ring.go:21
↓ 2 callersFunctionLenf
Lenf asserts that the specified object has specific length. Lenf also fails if the object has a type that len() not accept. assert.Lenf(t, mySlice,
internal/testify/assert/assertion_format.go:463
↓ 2 callersFunctionLess
(a, b string)
parser/operator/operator.go:15
↓ 2 callersFunctionLessOrEqualf
LessOrEqualf asserts that the first element is less than or equal to the second assert.LessOrEqualf(t, 1, 2, "error message %s", "formatted") asser
internal/testify/assert/assertion_format.go:488
↓ 2 callersFunctionLessf
Lessf asserts that the first element is less than the second assert.Lessf(t, 1, 2, "error message %s", "formatted") assert.Lessf(t, float64(1), flo
internal/testify/assert/assertion_format.go:475
↓ 2 callersFunctionNegativef
Negativef asserts that the specified element is negative assert.Negativef(t, -1, "error message %s", "formatted") assert.Negativef(t, -1.23, "error
internal/testify/assert/assertion_format.go:499
↓ 2 callersFunctionNeverf
Neverf asserts that the given condition doesn't satisfy in waitFor time, periodically checking the target function each tick. assert.Neverf(t, func(
internal/testify/assert/assertion_format.go:510
↓ 2 callersFunctionNew
New returns a reusable lexer.
parser/lexer/lexer.go:34
↓ 2 callersFunctionNewEnv
()
test/fuzz/fuzz_env.go:9
↓ 2 callersFunctionNewProgram
NewProgram returns a new Program. It's used by the compiler.
vm/program.go:34
↓ 2 callersMethodNil
Nil asserts that the specified object is nil. a.Nil(err)
internal/testify/assert/assertion_forward.go:1026
↓ 2 callersMethodNil
Nil asserts that the specified object is nil. a.Nil(err)
internal/testify/require/require_forward.go:1028
↓ 2 callersFunctionNilf
Nilf asserts that the specified object is nil. assert.Nilf(t, err, "error message %s", "formatted")
internal/testify/assert/assertion_format.go:520
↓ 2 callersFunctionNoDirExistsf
NoDirExistsf checks whether a directory does not exist in the given path. It fails if the path points to an existing _directory_ only.
internal/testify/assert/assertion_format.go:529
↓ 2 callersMethodNoError
NoError asserts that a function returned no error (i.e. `nil`). actualObj, err := SomeFunction() if a.NoError(err) { assert.Equal(t, expec
internal/testify/assert/assertion_forward.go:1067
↓ 2 callersMethodNoError
NoError asserts that a function returned no error (i.e. `nil`). actualObj, err := SomeFunction() if a.NoError(err) { assert.Equal(t, expec
internal/testify/require/require_forward.go:1069
↓ 2 callersFunctionNoErrorf
NoErrorf asserts that a function returned no error (i.e. `nil`). actualObj, err := SomeFunction() if assert.NoErrorf(t, err, "error message %s"
internal/testify/assert/assertion_format.go:542
↓ 2 callersFunctionNoFileExistsf
NoFileExistsf checks whether a file does not exist in a given path. It fails if the path points to an existing _file_ only.
internal/testify/assert/assertion_format.go:551
↓ 2 callersMethodNode
Node returns origin ast.Node.
vm/program.go:66
↓ 2 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/require/require_forward.go:1113
↓ 2 callersFunctionNotContainsf
NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element. assert.NotContains
internal/testify/assert/assertion_format.go:564
← previousnext →401–500 of 2,191, ranked by callers