Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/expr-lang/expr
/ functions
Functions
2,191 in github.com/expr-lang/expr
⨍
Functions
2,191
◇
Types & classes
379
↓ 4 callers
Method
NotContains
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 callers
Function
NotEqualValues
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 callers
Function
NotErrorIs
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 callers
Method
NotRegexp
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 callers
Function
Panics
Panics asserts that the code inside the specified PanicTestFunc panics. assert.Panics(t, func(){ GoCrazy() })
internal/testify/require/require.go:1742
↓ 4 callers
Method
Regexp
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 callers
Method
Reset
(source file.Source)
parser/lexer/lexer.go:54
↓ 4 callers
Method
Set
(s string, i int)
test/interface/interface_test.go:20
↓ 4 callers
Method
SetLocation
(file.Location)
ast/node.go:17
↓ 4 callers
Function
TypeKind
(t reflect.Type, k reflect.Kind)
internal/deref/deref.go:49
↓ 4 callers
Method
acceptRun
(valid string)
parser/lexer/lexer.go:153
↓ 4 callers
Function
changeKind
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 callers
Function
cleanUpTempFiles
(paths []string)
internal/testify/assert/assertions_test.go:2119
↓ 4 callers
Function
httpCode
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 callers
Method
isBJunk
(s string)
internal/difflib/difflib.go:192
↓ 4 callers
Function
isOrdered
isOrdered checks that collection contains orderable elements.
internal/testify/assert/assertion_order.go:9
↓ 4 callers
Function
max
(a, b int)
internal/difflib/difflib.go:33
↓ 4 callers
Function
printComplex
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 callers
Function
printFloat
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 callers
Function
printInt
printInt outputs a signed integer value to Writer w.
internal/spew/common.go:153
↓ 4 callers
Function
redirStdout
redirStdout is a helper function to return the standard output from f as a byte slice.
internal/spew/spew_test.go:109
↓ 4 callers
Method
scanDigits
returns lower-case ch iff ch is ASCII letter
parser/lexer/lexer.go:192
↓ 4 callers
Method
skip
()
parser/lexer/lexer.go:137
↓ 4 callers
Function
toFloat
(x interface{})
internal/testify/assert/assertions.go:1320
↓ 4 callers
Method
toIntegerNode
(number int64)
parser/parser.go:553
↓ 4 callers
Function
toString
(n Node)
optimizer/fold.go:313
↓ 4 callers
Function
unhex
(b byte)
parser/lexer/utils.go:339
↓ 4 callers
Method
unpackValue
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 callers
Method
unpackValue
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 callers
Function
validateAggregateFunc
(name string, args []reflect.Type)
builtin/validation.go:10
↓ 3 callers
Function
AsKind
AsKind tells the compiler to expect kind of the result.
expr.go:73
↓ 3 callers
Function
DisableAllBuiltins
DisableAllBuiltins disables all builtins.
expr.go:174
↓ 3 callers
Method
DisassembleWriter
DisassembleWriter takes a writer and writes opcodes to it.
vm/program.go:85
↓ 3 callers
Function
Empty
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 callers
Method
Enqueue
Enqueue adds an item to the ring.
internal/ring/ring.go:60
↓ 3 callers
Function
EnvWithCache
(c *Cache, env any)
conf/env.go:19
↓ 3 callers
Method
EqualError
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 callers
Function
EqualValues
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 callers
Function
ErrorContains
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 callers
Function
Errorf
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 callers
Function
Exactly
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 callers
Method
FailNow
()
internal/testify/assert/assertions.go:321
↓ 3 callers
Function
Float
(x any)
builtin/lib.go:195
↓ 3 callers
Method
Format
Format satisfies the fmt.Formatter interface. See NewFormatter for usage details.
internal/spew/format.go:371
↓ 3 callers
Function
FromType
FromType calls FromType on a nil *Cache. See the comment on Cache.
checker/nature/nature.go:203
↓ 3 callers
Method
HTTPBodyContains
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 callers
Method
HTTPBodyNotContains
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 callers
Method
HTTPError
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 callers
Method
HTTPRedirect
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 callers
Method
HTTPSuccess
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 callers
Function
InDelta
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 callers
Method
IsAnyOf
(cs ...NatureCheck)
checker/nature/nature.go:530
↓ 3 callers
Function
IsBoolean
(op string)
parser/operator/operator.go:19
↓ 3 callers
Method
Item
Item returns the current element from the scope using fast paths when available.
vm/utils.go:31
↓ 3 callers
Function
Lex
Lex will buffer and return the tokens of a disposable *[Lexer].
parser/lexer/lexer.go:16
↓ 3 callers
Function
MaxNodes
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 callers
Function
MethodIndex
(c *Cache, env Nature, node ast.Node)
checker/info.go:30
↓ 3 callers
Method
Nature
()
types/types.go:13
↓ 3 callers
Function
NatureOf
NatureOf calls NatureOf on a nil *Cache. See the comment on Cache.
checker/nature/nature.go:197
↓ 3 callers
Function
NewDefaultConfig
NewDefaultConfig returns a ConfigState with the following default settings. Indent: " " MaxDepth: 0 DisableMethods: false DisablePointerMethods:
internal/spew/config.go:304
↓ 3 callers
Function
NewMatcherWithJunk
(a, b []string, autoJunk bool, isJunk func(string) bool)
internal/difflib/difflib.go:106
↓ 3 callers
Method
Next
()
parser/lexer/lexer.go:60
↓ 3 callers
Function
NotContains
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 callers
Function
NotEmpty
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 callers
Function
NotEqual
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 callers
Function
NotPanics
NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. assert.NotPanics(t, func(){ RemainCalm() })
internal/testify/require/require.go:1602
↓ 3 callers
Function
NotZero
NotZero asserts that i is not the zero value for its type.
internal/testify/require/require.go:1718
↓ 3 callers
Function
ParseCheck
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 callers
Method
PromoteNumericNature
(c *Cache, rhs Nature)
checker/nature/nature.go:480
↓ 3 callers
Method
Reset
()
internal/ring/ring.go:29
↓ 3 callers
Method
Sub
(a, b float64)
test/playground/env.go:139
↓ 3 callers
Function
Timezone
Timezone sets default timezone for date() and now() builtin functions.
expr.go:209
↓ 3 callers
Function
ToFloat64
(a any)
vm/runtime/runtime.go:385
↓ 3 callers
Function
TypedFuncIndex
(fn reflect.Type, method bool)
checker/info.go:51
↓ 3 callers
Method
Unwrap
()
file/error.go:66
↓ 3 callers
Function
WithinDuration
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 callers
Function
Zero
Zero asserts that i is the zero value for its type.
internal/testify/require/require.go:2020
↓ 3 callers
Function
assertAlmostEqual
(t *testing.T, a, b float64, places int)
internal/difflib/difflib_test.go:12
↓ 3 callers
Function
buildErrorChainString
(err error)
internal/testify/assert/assertions.go:2079
↓ 3 callers
Function
calculateRatio
(matches, length int)
internal/difflib/difflib.go:40
↓ 3 callers
Function
cases
(op string, xs ...[]string)
vm/runtime/helpers/main.go:58
↓ 3 callers
Function
check
(err error)
debug/debugger.go:200
↓ 3 callers
Method
checkArguments
( name string, fn Nature, arguments []ast.Node, node ast.Node, )
checker/checker.go:1050
↓ 3 callers
Method
commit
()
parser/lexer/lexer.go:75
↓ 3 callers
Function
containsValue
(values []compareResult, value compareResult)
internal/testify/assert/assertion_compare.go:481
↓ 3 callers
Method
emitCond
(body func())
compiler/compiler.go:1183
↓ 3 callers
Method
emitLocation
(loc file.Location, op Opcode, arg int)
compiler/compiler.go:114
↓ 3 callers
Method
finished
()
checker/nature/utils.go:34
↓ 3 callers
Function
getLen
getLen tries to get the length of an object. It returns (0, false) if impossible.
internal/testify/assert/assertions.go:782
↓ 3 callers
Function
handleMethods
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 callers
Function
helpTestSortValues
(tests []sortTestCase, cs *spew.ConfigState, t *testing.T)
internal/spew/common_test.go:134
↓ 3 callers
Function
isPrivate
(s string)
docgen/docgen.go:257
↓ 3 callers
Function
isProtobuf
(s string)
docgen/docgen.go:261
↓ 3 callers
Function
isTest
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 callers
Function
lower
(ch rune)
parser/lexer/lexer.go:190
↓ 3 callers
Function
newFormatter
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 callers
Method
parseArguments
(arguments []Node)
parser/parser.go:647
↓ 3 callers
Method
parseCall
(token Token, arguments []Node, checkOverrides bool)
parser/parser.go:569
↓ 3 callers
Function
samePointers
samePointers compares two generic interface objects and returns whether they point to the same object
internal/testify/assert/assertions.go:533
↓ 3 callers
Function
sortValues
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
← previous
next →
301–400 of 2,191, ranked by callers