MCPcopy Create free account

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

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

↓ 2 callersMethodNotEmpty
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 a.NotEmpty(obj
internal/testify/require/require_forward.go:1139
↓ 2 callersFunctionNotEmptyf
NotEmptyf 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.NotEmp
internal/testify/assert/assertion_format.go:577
↓ 2 callersMethodNotEqual
NotEqual asserts that the specified values are NOT equal. a.NotEqual(obj1, obj2) Pointer variable equality is determined based on the equality of t
internal/testify/require/require_forward.go:1165
↓ 2 callersFunctionNotEqualValuesf
NotEqualValuesf asserts that two objects are not equal even when converted to the same type assert.NotEqualValuesf(t, obj1, obj2, "error message %s"
internal/testify/assert/assertion_format.go:600
↓ 2 callersFunctionNotEqualf
NotEqualf asserts that the specified values are NOT equal. assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted") Pointer variable equali
internal/testify/assert/assertion_format.go:590
↓ 2 callersFunctionNotErrorIsf
NotErrorIsf asserts that at none of the errors in err's chain matches target. This is a wrapper for errors.Is.
internal/testify/assert/assertion_format.go:609
↓ 2 callersFunctionNotImplementsf
NotImplementsf asserts that an object does not implement the specified interface. assert.NotImplementsf(t, (*MyInterface)(nil), new(MyObject), "erro
internal/testify/assert/assertion_format.go:619
↓ 2 callersMethodNotNil
NotNil asserts that the specified object is not nil. a.NotNil(err)
internal/testify/assert/assertion_forward.go:1244
↓ 2 callersMethodNotNil
NotNil asserts that the specified object is not nil. a.NotNil(err)
internal/testify/require/require_forward.go:1246
↓ 2 callersFunctionNotNilf
NotNilf asserts that the specified object is not nil. assert.NotNilf(t, err, "error message %s", "formatted")
internal/testify/assert/assertion_format.go:629
↓ 2 callersMethodNotPanics
NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. a.NotPanics(func(){ RemainCalm() })
internal/testify/assert/assertion_forward.go:1264
↓ 2 callersMethodNotPanics
NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. a.NotPanics(func(){ RemainCalm() })
internal/testify/require/require_forward.go:1266
↓ 2 callersFunctionNotPanicsf
NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s",
internal/testify/assert/assertion_format.go:639
↓ 2 callersFunctionNotRegexpf
NotRegexpf asserts that a specified regexp does not match a string. assert.NotRegexpf(t, regexp.MustCompile("starts"), "it's starting", "error messa
internal/testify/assert/assertion_format.go:650
↓ 2 callersFunctionNotSamef
NotSamef asserts that two pointers do not reference the same object. assert.NotSamef(t, ptr1, ptr2, "error message %s", "formatted") Both arguments
internal/testify/assert/assertion_format.go:663
↓ 2 callersFunctionNotSubsetf
NotSubsetf asserts that the specified list(array, slice...) or map does NOT contain all elements given in the specified subset list(array, slice...) o
internal/testify/assert/assertion_format.go:676
↓ 2 callersMethodNotZero
NotZero asserts that i is not the zero value for its type.
internal/testify/assert/assertion_forward.go:1356
↓ 2 callersMethodNotZero
NotZero asserts that i is not the zero value for its type.
internal/testify/require/require_forward.go:1358
↓ 2 callersFunctionNotZerof
NotZerof asserts that i is not the zero value for its type.
internal/testify/assert/assertion_format.go:684
↓ 2 callersMethodNth
Nth returns the n-th oldest value (zero-based) in the ring without making any change.
internal/ring/ring.go:40
↓ 2 callersMethodNumMethods
(c *Cache)
checker/nature/nature.go:290
↓ 2 callersMethodPanics
Panics asserts that the code inside the specified PanicTestFunc panics. a.Panics(func(){ GoCrazy() })
internal/testify/assert/assertion_forward.go:1374
↓ 2 callersMethodPanics
Panics asserts that the code inside the specified PanicTestFunc panics. a.Panics(func(){ GoCrazy() })
internal/testify/require/require_forward.go:1376
↓ 2 callersFunctionPanicsWithErrorf
PanicsWithErrorf asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value is an error that satisfies the Eq
internal/testify/assert/assertion_format.go:706
↓ 2 callersFunctionPanicsWithValuef
PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value.
internal/testify/assert/assertion_format.go:717
↓ 2 callersFunctionPanicsf
Panicsf asserts that the code inside the specified PanicTestFunc panics. assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted")
internal/testify/assert/assertion_format.go:694
↓ 2 callersMethodPatchAndCheck
PatchAndCheck applies all patchers and checks the tree.
checker/checker.go:72
↓ 2 callersMethodPosition
()
vm/vm.go:782
↓ 2 callersFunctionPositivef
Positivef asserts that the specified element is positive assert.Positivef(t, 1, "error message %s", "formatted") assert.Positivef(t, 1.23, "error m
internal/testify/assert/assertion_format.go:728
↓ 2 callersFunctionPrintf
Printf is a wrapper for fmt.Printf that treats each argument as if it were passed with a default Formatter interface returned by NewFormatter. It ret
internal/spew/spew.go:91
↓ 2 callersMethodQuickRatio
Return an upper bound on ratio() relatively quickly. This isn't defined beyond that it is an upper bound on .Ratio(), and is faster to compute.
internal/difflib/difflib.go:480
↓ 2 callersMethodRealQuickRatio
Return an upper bound on ratio() very quickly. This isn't defined beyond that it is an upper bound on .Ratio(), and is faster to compute than either
internal/difflib/difflib.go:512
↓ 2 callersFunctionRegexpf
Regexpf asserts that a specified regexp matches a string. assert.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "forma
internal/testify/assert/assertion_format.go:739
↓ 2 callersFunctionSamef
Samef asserts that two pointers reference the same object. assert.Samef(t, ptr1, ptr2, "error message %s", "formatted") Both arguments must be poin
internal/testify/assert/assertion_format.go:752
↓ 2 callersMethodSetNature
(nature.Nature)
ast/node.go:19
↓ 2 callersMethodSetSeqs
Set two sequences to be compared.
internal/difflib/difflib.go:115
↓ 2 callersMethodSize
()
test/coredns/coredns.go:85
↓ 2 callersMethodSource
Source returns origin file.Source.
vm/program.go:61
↓ 2 callersFunctionSprintf
Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were passed with a default Formatter interface returned by NewFormatter. It r
internal/spew/spew.go:125
↓ 2 callersMethodSprintln
Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it were passed with a Formatter interface returned by c.NewFormatter. It retur
internal/spew/config.go:219
↓ 2 callersMethodString
()
checker/nature/nature.go:223
↓ 2 callersFunctionStructFields
(c *Cache, t reflect.Type)
checker/nature/utils.go:170
↓ 2 callersFunctionSubsetf
Subsetf asserts that the specified list(array, slice...) or map contains all elements given in the specified subset list(array, slice...) or map. as
internal/testify/assert/assertion_format.go:764
↓ 2 callersMethodTrue
True asserts that the specified value is true. a.True(myBool)
internal/testify/require/require_forward.go:1536
↓ 2 callersFunctionTruef
Truef asserts that the specified value is true. assert.Truef(t, myBool, "error message %s", "formatted")
internal/testify/assert/assertion_format.go:774
↓ 2 callersFunctionTruef
Truef asserts that the specified value is true. assert.Truef(t, myBool, "error message %s", "formatted")
internal/testify/require/require.go:1957
↓ 2 callersMethodWithEnv
(env any)
conf/config.go:70
↓ 2 callersMethodWithinDuration
WithinDuration asserts that the two times are within duration delta of each other. a.WithinDuration(time.Now(), time.Now(), 10*time.Second)
internal/testify/require/require_forward.go:1556
↓ 2 callersFunctionWithinDurationf
WithinDurationf asserts that the two times are within duration delta of each other. assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second
internal/testify/assert/assertion_format.go:784
↓ 2 callersFunctionWithinRangef
WithinRangef asserts that a time is within a time range (inclusive). assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add
internal/testify/assert/assertion_format.go:794
↓ 2 callersFunctionZerof
Zerof asserts that i is the zero value for its type.
internal/testify/assert/assertion_format.go:802
↓ 2 callersFunctionbenchmarkSplitLines
(b *testing.B, count int)
internal/difflib/difflib_test.go:409
↓ 2 callersMethodcalcBackwardJump
(to int)
compiler/compiler.go:212
↓ 2 callersFunctioncatchPanic
catchPanic handles any panics that might occur during the handleMethods calls.
internal/spew/common.go:72
↓ 2 callersMethodcheckFunction
(f *builtin.Function, node ast.Node, arguments []ast.Node)
checker/checker.go:996
↓ 2 callersMethodcheckNodeLimit
()
parser/parser.go:100
↓ 2 callersMethodcheckResultAndErrMsg
(t *testing.T, expectedRes, res bool, expectedErrMsg string)
internal/testify/assert/assertions_test.go:2971
↓ 2 callersFunctioncheckTypeSuits
(t reflect.Type, l reflect.Type, r reflect.Type, firstInIndex int)
patcher/operator_override.go:99
↓ 2 callersFunctionclearSlice
(s S)
checker/checker.go:176
↓ 2 callersFunctionclearSlice
(s S)
vm/vm.go:786
↓ 2 callersFunctioncreateNestedArithmeticExpr
Helper functions for creating deeply nested expressions
vm/vm_test.go:1350
↓ 2 callersFunctiondiffLists
diffLists diffs two arrays/slices and returns slices of elements that are only in A and only in B. If some element is present multiple times, each ins
internal/testify/assert/assertions.go:1120
↓ 2 callersFunctiondigitVal
(ch rune)
parser/lexer/lexer.go:180
↓ 2 callersMethodemitFunction
emitFunction adds builtin.Function.Func to the program.functions and emits call opcode.
compiler/compiler.go:176
↓ 2 callersMethodemitLoopBackwards
(body func())
compiler/compiler.go:1206
↓ 2 callersMethodequalBinaryNode
(node *ast.BinaryNode)
compiler/compiler.go:627
↓ 2 callersMethoderrorAt
(token Token, format string, args ...any)
parser/parser.go:155
↓ 2 callersMethodfindInEmbedded
( c *Cache, parentEmbed, childEmbed *structData, childIndex []int, name string, )
checker/nature/utils.go:112
↓ 2 callersFunctionformatRangeContext
Convert range to the "ed" format.
internal/difflib/difflib.go:645
↓ 2 callersFunctionformatRangeUnified
Convert range to the "ed" format
internal/difflib/difflib.go:518
↓ 2 callersFunctionfromMethod
(b bool)
docgen/docgen.go:116
↓ 2 callersMethodgetMethodset
(c *Cache)
checker/nature/nature.go:279
↓ 2 callersMethodident
ident method returns type of environment variable, builtin or function.
checker/checker.go:263
↓ 2 callersFunctionisDuration
(t string)
vm/runtime/helpers/main.go:136
↓ 2 callersFunctionisFloat
(t string)
vm/runtime/helpers/main.go:132
↓ 2 callersFunctionisFunction
(arg interface{})
internal/testify/assert/assertions.go:1837
↓ 2 callersFunctionisList
isList checks that the provided value is array or slice.
internal/testify/assert/assertions.go:1108
↓ 2 callersFunctionisNumericType
isNumericType returns true if the type is one of: int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, float32, float64, complex64, co
internal/testify/assert/assertions.go:199
↓ 2 callersFunctionisSimpleType
(node ast.Node)
compiler/compiler.go:649
↓ 2 callersFunctionkind
(t reflect.Type)
compiler/compiler.go:1350
↓ 2 callersFunctionmatchRegexp
matchRegexp return true if a specified regexp matches a string.
internal/testify/assert/assertions.go:1617
↓ 2 callersFunctionmemoryUsage
()
repl/repl.go:128
↓ 2 callersFunctionminMax
(name string, fn func(any, any) bool, depth int, args ...any)
builtin/lib.go:236
↓ 2 callersMethodout
(c *Cache, i int)
checker/nature/nature.go:357
↓ 2 callersFunctionprintBool
printBool outputs a boolean value as true or false to Writer w.
internal/spew/common.go:144
↓ 2 callersFunctionprintUint
printUint outputs an unsigned integer value to Writer w.
internal/spew/common.go:158
↓ 2 callersMethodreset
(config *conf.Config)
checker/checker.go:160
↓ 2 callersMethodrunVisitors
Run visitors in a given config over the given tree runRepeatable controls whether to filter for only vistors that require multiple passes or not
checker/checker.go:93
↓ 2 callersMethodscanString
(quote rune)
parser/lexer/lexer.go:254
↓ 2 callersFunctionstringizeWants
stringizeWants converts a slice of wanted test output into a format suitable for a test error message.
internal/spew/common_test.go:94
↓ 2 callersFunctiontestFailed
testFailed returns whether or not a test failed by checking if the result of the test is in the slice of wanted strings.
internal/spew/common_test.go:108
↓ 2 callersMethodtrySet
(name string, sf *structField)
checker/nature/utils.go:156
↓ 2 callersFunctiontypeAndKind
(v interface{})
internal/testify/assert/assertions.go:1781
↓ 1 callersMethodAba
Aba is a special method that is not part of the Bar interface, but is used to test that the correct method is called. "Aba" name is chosen to be befor
test/interface/interface_method_test.go:27
↓ 1 callersFunctionAdd
(a, b interface{})
vm/runtime/helpers[generated].go:2082
↓ 1 callersMethodAll
(c *Cache)
checker/nature/nature.go:433
↓ 1 callersFunctionAllowedNegateSuffix
(op string)
parser/operator/operator.go:23
↓ 1 callersFunctionArrayFromType
(c *Cache, t reflect.Type)
checker/nature/nature.go:208
↓ 1 callersMethodArrayNode
(node *ast.ArrayNode)
compiler/compiler.go:1292
↓ 1 callersFunctionAsAny
AsAny tells the compiler to expect any result.
expr.go:66
← previousnext →501–600 of 2,191, ranked by callers