Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/jmespath/go-jmespath
/ functions
Functions
1,151 in github.com/jmespath/go-jmespath
⨍
Functions
1,151
◇
Types & classes
104
↓ 463 callers
Method
Helper
()
internal/testify/require/requirements.go:10
↓ 270 callers
Function
Equal
Equal asserts that two objects are equal. assert.Equal(t, 123, 123) Pointer variable equality is determined based on the equality of the referenced
internal/testify/assert/assertions.go:334
↓ 219 callers
Method
Error
()
internal/testify/assert/assertions_test.go:935
↓ 140 callers
Function
True
True asserts that the specified value is true. assert.True(t, myBool)
internal/testify/assert/assertions.go:641
↓ 119 callers
Function
False
False asserts that the specified value is false. assert.False(t, myBool)
internal/testify/assert/assertions.go:662
↓ 114 callers
Method
FailNow
()
internal/testify/require/requirements.go:6
↓ 106 callers
Function
Fail
Fail reports a failure through
internal/testify/assert/assertions.go:241
↓ 97 callers
Function
New
New makes a new Assertions object for the specified TestingT.
internal/testify/assert/forward_assertions.go:10
↓ 86 callers
Method
Error
Error asserts that a function returned an error (i.e. not `nil`). actualObj, err := SomeFunction() if a.Error(err) { assert.Equal(t, expectedErro
internal/testify/require/require_forward.go:201
↓ 84 callers
Method
On
On chains a new expectation description onto the mocked interface. This allows syntax like. Mock. On("MyMethod", 1).Return(nil). On("MyOtherMethod",
internal/testify/mock/mock.go:180
↓ 82 callers
Method
Return
Return specifies the return arguments for the expectation. Mock.On("DoSomething").Return(errors.New("failed"))
internal/testify/mock/mock.go:94
↓ 66 callers
Function
New
New makes a new Assertions object for the specified TestingT.
internal/testify/require/forward_requirements.go:10
↓ 43 callers
Method
Called
Called tells the mock object that a method has been called, and gets an array of arguments to return. Panics if the call is unexpected (i.e. not prec
internal/testify/mock/mock.go:321
↓ 39 callers
Method
False
False asserts that the specified value is false. a.False(myBool)
internal/testify/assert/assertion_forward.go:297
↓ 37 callers
Function
Nil
Nil asserts that the specified object is nil. assert.Nil(t, err)
internal/testify/assert/assertions.go:531
↓ 32 callers
Method
True
True asserts that the specified value is true. a.True(myBool)
internal/testify/assert/assertion_forward.go:1165
↓ 31 callers
Function
Contains
Contains asserts that the specified string, list(array, slice...) or map contains the specified substring or element. assert.Contains(t, "Hello World
internal/testify/assert/assertions.go:743
↓ 26 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/assert/assertions.go:573
↓ 24 callers
Method
Equal
Equal asserts that two objects are equal. a.Equal(123, 123) Pointer variable equality is determined based on the equality of the referenced values (
internal/testify/assert/assertion_forward.go:127
↓ 24 callers
Function
ObjectsAreEqual
* Helper functions */ ObjectsAreEqual determines if two objects are considered equal. This function does no assertion of any kind.
internal/testify/assert/assertions.go:58
↓ 23 callers
Method
Run
(name string, f func(t *testing.T))
internal/testify/suite/suite.go:170
↓ 22 callers
Method
Execute
Execute takes an ASTNode and input data and interprets the AST directly. It will produce the result of applying the JMESPath expression associated wit
interpreter.go:31
↓ 22 callers
Method
String
String gets the argument at the specified index. Panics if there is no argument, or if the argument is of the wrong type. If no index is provided, St
internal/testify/mock/mock.go:788
↓ 22 callers
Method
current
()
parser.go:565
↓ 22 callers
Function
isEmpty
isEmpty gets whether the specified object is considered empty or not.
internal/testify/assert/assertions.go:542
↓ 20 callers
Method
AssertExpectations
(TestingT)
internal/testify/mock/mock.go:415
↓ 20 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 equali
internal/testify/assert/assertions.go:681
↓ 20 callers
Function
NotNil
NotNil asserts that the specified object is not nil. assert.NotNil(t, err)
internal/testify/assert/assertions.go:485
↓ 19 callers
Function
Search
Search evaluates a JMESPath expression against input data and returns the result.
api.go:41
↓ 18 callers
Function
ElementsMatch
ElementsMatch asserts that the specified listA(array, slice...) is equal to specified listB(array, slice...) ignoring the order of the elements. If th
internal/testify/assert/assertions.go:876
↓ 18 callers
Method
Len
Len asserts that the specified object has specific length. Len also fails if the object has a type that len() not accept. a.Len(mySlice, 3)
internal/testify/assert/assertion_forward.go:650
↓ 18 callers
Method
match
(tokenType tokType)
parser.go:212
↓ 17 callers
Function
Equal
Equal asserts that two objects are equal. assert.Equal(t, 123, 123) Pointer variable equality is determined based on the equality of the referenced
internal/testify/require/require.go:158
↓ 16 callers
Function
AnythingOfType
AnythingOfType returns an AnythingOfTypeArgument object containing the name of the type to check for. Used in Diff and Assert. For example: Assert(
internal/testify/mock/mock.go:577
↓ 16 callers
Method
Diff
Diff gets a string describing the differences between the arguments and the specified objects. Returns the diff string and number of differences foun
internal/testify/mock/mock.go:684
↓ 16 callers
Method
Get
Get Returns the argument at the specified index.
internal/testify/mock/mock.go:663
↓ 16 callers
Method
Name
()
internal/testify/require/requirements_test.go:509
↓ 16 callers
Method
Parse
Parse will compile a JMESPath expression.
parser.go:125
↓ 15 callers
Function
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() as
internal/testify/assert/assertions.go:1292
↓ 15 callers
Function
MatchedBy
MatchedBy can be used to match a mock call based on only certain properties from a complex struct or some calculation. It takes a function that will b
internal/testify/mock/mock.go:646
↓ 15 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.NotEmpty
internal/testify/assert/assertions.go:593
↓ 15 callers
Function
NotPanics
NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. assert.NotPanics(t, func(){ RemainCalm() })
internal/testify/assert/assertions.go:1028
↓ 15 callers
Function
Panics
Panics asserts that the code inside the specified PanicTestFunc panics. assert.Panics(t, func(){ GoCrazy() })
internal/testify/assert/assertions.go:971
↓ 15 callers
Function
Regexp
Regexp asserts that a specified regexp matches a string. assert.Regexp(t, regexp.MustCompile("start"), "it's starting") assert.Regexp(t, "start...$",
internal/testify/assert/assertions.go:1328
↓ 15 callers
Function
includeElement
containsElement try loop over the list check if the list includes the element. return (false, false) if impossible. return (true, false) if element wa
internal/testify/assert/assertions.go:702
↓ 15 callers
Method
parseExpression
(bindingPower int)
parser.go:145
↓ 14 callers
Method
Error
Error gets the argument at the specified index. Panics if there is no argument, or if the argument is of the wrong type.
internal/testify/mock/mock.go:825
↓ 14 callers
Method
Errorf
(format string, args ...interface{})
internal/testify/require/requirements.go:5
↓ 14 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/assert/assertions.go:1095
↓ 14 callers
Method
Once
Once indicates that that the mock should only return the value once. Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Once()
internal/testify/mock/mock.go:106
↓ 14 callers
Function
diff
diff returns a diff of both values as long as both are of the same type and are a struct, map, slice, array or string. Otherwise it returns an empty s
internal/testify/assert/assertions.go:1506
↓ 14 callers
Function
isFalse
IsFalse determines if an object is false based on the JMESPath spec. JMESPath defines false values to be any of: - An empty string array, or hash. - T
util.go:13
↓ 13 callers
Function
JSONEq
JSONEq asserts that two JSON strings are equivalent. assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
internal/testify/assert/assertions.go:1458
↓ 13 callers
Function
Run
Run takes a testing suite and runs all of the tests attached to it.
internal/testify/suite/suite.go:83
↓ 13 callers
Function
YAMLEq
YAMLEq asserts that two YAML strings are equivalent.
internal/testify/assert/assertions.go:1476
↓ 12 callers
Function
NotSubset
NotSubset asserts that the specified list(array, slice...) contains not all elements given in the specified subset(array, slice...). assert.NotSubset
internal/testify/assert/assertions.go:831
↓ 12 callers
Method
T
()
internal/testify/suite/interfaces.go:8
↓ 12 callers
Method
next
()
lexer.go:122
↓ 11 callers
Function
JSONEq
JSONEq asserts that two JSON strings are equivalent. assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
internal/testify/require/require.go:804
↓ 11 callers
Function
Len
Len asserts that the specified object has specific length. Len also fails if the object has a type that len() not accept. assert.Len(t, mySlice, 3)
internal/testify/assert/assertions.go:623
↓ 11 callers
Function
Subset
Subset asserts that the specified list(array, slice...) contains all elements given in the specified subset(array, slice...). assert.Subset(t, [1, 2,
internal/testify/assert/assertions.go:787
↓ 11 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/assert/assertions.go:1043
↓ 11 callers
Function
YAMLEq
YAMLEq asserts that two YAML strings are equivalent.
internal/testify/require/require.go:1534
↓ 10 callers
Method
Empty
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/assert/assertion_forward.go:102
↓ 10 callers
Method
JSONEq
JSONEq asserts that two JSON strings are equivalent. a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
internal/testify/assert/assertion_forward.go:629
↓ 10 callers
Method
JSONEq
JSONEq asserts that two JSON strings are equivalent. a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
internal/testify/require/require_forward.go:630
↓ 10 callers
Method
Len
()
functions.go:89
↓ 10 callers
Function
NewParser
NewParser creates a new JMESPath parser.
parser.go:119
↓ 10 callers
Function
NotContains
NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element. assert.NotContains(t
internal/testify/assert/assertions.go:766
↓ 10 callers
Method
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 a.NotEmpty(obj)
internal/testify/assert/assertion_forward.go:854
↓ 10 callers
Method
TheExampleMethod
(a, b, c int)
internal/testify/mock/mock_test.go:22
↓ 10 callers
Method
YAMLEq
YAMLEq asserts that two YAML strings are equivalent.
internal/testify/assert/assertion_forward.go:1203
↓ 10 callers
Method
YAMLEq
YAMLEq asserts that two YAML strings are equivalent.
internal/testify/require/require_forward.go:1204
↓ 9 callers
Method
advance
()
parser.go:573
↓ 9 callers
Function
objsEqual
ObjsEqual is a generic object equality check. It will take two arbitrary objects and recursively determine if they are equal.
util.go:50
↓ 9 callers
Function
runLexBenchmark
(b *testing.B, expression string)
lexer_test.go:156
↓ 9 callers
Function
runParseBenchmark
(b *testing.B, expression string)
parser_test.go:131
↓ 8 callers
Function
CallerInfo
* 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:105
↓ 8 callers
Function
DirExists
DirExists 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 wh
internal/testify/assert/assertions.go:1419
↓ 8 callers
Function
Exactly
Exactly asserts that two objects are equal in value and type. assert.Exactly(t, int32(123), int64(123))
internal/testify/assert/assertions.go:466
↓ 8 callers
Function
FileExists
FileExists 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 t
internal/testify/assert/assertions.go:1384
↓ 8 callers
Function
HTTPSuccess
HTTPSuccess asserts that a specified handler returns a success status code. assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) R
internal/testify/assert/http_assertions.go:29
↓ 8 callers
Method
Int
Int gets the argument at the specified index. Panics if there is no argument, or if the argument is of the wrong type.
internal/testify/mock/mock.go:814
↓ 8 callers
Function
NoDirExists
NoDirExists 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/assertions.go:1438
↓ 8 callers
Function
NoFileExists
NoFileExists 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/assertions.go:1403
↓ 8 callers
Method
WithinDuration
WithinDuration asserts that the two times are within duration delta of each other. a.WithinDuration(time.Now(), time.Now(), 10*time.Second)
internal/testify/assert/assertion_forward.go:1185
↓ 8 callers
Function
didPanic
didPanic returns true if the function passed to it panics. Otherwise, it returns false.
internal/testify/assert/assertions.go:945
↓ 8 callers
Function
getTempSymlinkPath
(file string)
internal/testify/assert/assertions_test.go:1542
↓ 8 callers
Method
parseProjectionRHS
(bindingPower int)
parser.go:542
↓ 7 callers
Method
AssertCalled
AssertCalled asserts that the method was called. It can produce a false result when an argument is a pointer type and the underlying value changed aft
internal/testify/mock/mock.go:494
↓ 7 callers
Method
Contains
Contains asserts that the specified string, list(array, slice...) or map contains the specified substring or element. a.Contains("Hello World", "Worl
internal/testify/assert/assertion_forward.go:36
↓ 7 callers
Function
Error
Error asserts that a function returned an error (i.e. not `nil`). actualObj, err := SomeFunction() if assert.Error(t, err) { assert.Equal(t, expe
internal/testify/assert/assertions.go:1275
↓ 7 callers
Method
InDelta
InDelta asserts that the two numerals are within delta of each other. a.InDelta(math.Pi, 22/7.0, 0.01)
internal/testify/assert/assertion_forward.go:529
↓ 7 callers
Function
InDeltaSlice
InDeltaSlice is the same as InDelta, except it compares two slices.
internal/testify/assert/assertions.go:1124
↓ 7 callers
Method
Logf
(format string, args ...interface{})
internal/testify/mock/mock.go:21
↓ 7 callers
Function
NotRegexp
NotRegexp asserts that a specified regexp does not match a string. assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") assert.NotRegex
internal/testify/assert/assertions.go:1346
↓ 7 callers
Function
NotSame
NotSame asserts that two pointers do not reference the same object. assert.NotSame(t, ptr1, ptr2) Both arguments must be pointer variables. Pointer
internal/testify/assert/assertions.go:394
↓ 7 callers
Function
PanicsWithError
PanicsWithError asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value is an error that satisfies the Equ
internal/testify/assert/assertions.go:1008
↓ 7 callers
Function
PanicsWithValue
PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value.
internal/testify/assert/assertions.go:987
↓ 7 callers
Function
Same
Same asserts that two pointers reference the same object. assert.Same(t, ptr1, ptr2) Both arguments must be pointer variables. Pointer variable same
internal/testify/assert/assertions.go:374
next →
1–100 of 1,151, ranked by callers