MCPcopy Create free account

hub / github.com/jmespath/go-jmespath / functions

Functions1,151 in github.com/jmespath/go-jmespath

↓ 463 callersMethodHelper
()
internal/testify/require/requirements.go:10
↓ 270 callersFunctionEqual
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 callersMethodError
()
internal/testify/assert/assertions_test.go:935
↓ 140 callersFunctionTrue
True asserts that the specified value is true. assert.True(t, myBool)
internal/testify/assert/assertions.go:641
↓ 119 callersFunctionFalse
False asserts that the specified value is false. assert.False(t, myBool)
internal/testify/assert/assertions.go:662
↓ 114 callersMethodFailNow
()
internal/testify/require/requirements.go:6
↓ 106 callersFunctionFail
Fail reports a failure through
internal/testify/assert/assertions.go:241
↓ 97 callersFunctionNew
New makes a new Assertions object for the specified TestingT.
internal/testify/assert/forward_assertions.go:10
↓ 86 callersMethodError
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 callersMethodOn
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 callersMethodReturn
Return specifies the return arguments for the expectation. Mock.On("DoSomething").Return(errors.New("failed"))
internal/testify/mock/mock.go:94
↓ 66 callersFunctionNew
New makes a new Assertions object for the specified TestingT.
internal/testify/require/forward_requirements.go:10
↓ 43 callersMethodCalled
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 callersMethodFalse
False asserts that the specified value is false. a.False(myBool)
internal/testify/assert/assertion_forward.go:297
↓ 37 callersFunctionNil
Nil asserts that the specified object is nil. assert.Nil(t, err)
internal/testify/assert/assertions.go:531
↓ 32 callersMethodTrue
True asserts that the specified value is true. a.True(myBool)
internal/testify/assert/assertion_forward.go:1165
↓ 31 callersFunctionContains
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 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/assert/assertions.go:573
↓ 24 callersMethodEqual
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 callersFunctionObjectsAreEqual
* 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 callersMethodRun
(name string, f func(t *testing.T))
internal/testify/suite/suite.go:170
↓ 22 callersMethodExecute
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 callersMethodString
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 callersMethodcurrent
()
parser.go:565
↓ 22 callersFunctionisEmpty
isEmpty gets whether the specified object is considered empty or not.
internal/testify/assert/assertions.go:542
↓ 20 callersMethodAssertExpectations
(TestingT)
internal/testify/mock/mock.go:415
↓ 20 callersFunctionNotEqual
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 callersFunctionNotNil
NotNil asserts that the specified object is not nil. assert.NotNil(t, err)
internal/testify/assert/assertions.go:485
↓ 19 callersFunctionSearch
Search evaluates a JMESPath expression against input data and returns the result.
api.go:41
↓ 18 callersFunctionElementsMatch
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 callersMethodLen
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 callersMethodmatch
(tokenType tokType)
parser.go:212
↓ 17 callersFunctionEqual
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 callersFunctionAnythingOfType
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 callersMethodDiff
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 callersMethodGet
Get Returns the argument at the specified index.
internal/testify/mock/mock.go:663
↓ 16 callersMethodName
()
internal/testify/require/requirements_test.go:509
↓ 16 callersMethodParse
Parse will compile a JMESPath expression.
parser.go:125
↓ 15 callersFunctionEqualError
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 callersFunctionMatchedBy
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 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.NotEmpty
internal/testify/assert/assertions.go:593
↓ 15 callersFunctionNotPanics
NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. assert.NotPanics(t, func(){ RemainCalm() })
internal/testify/assert/assertions.go:1028
↓ 15 callersFunctionPanics
Panics asserts that the code inside the specified PanicTestFunc panics. assert.Panics(t, func(){ GoCrazy() })
internal/testify/assert/assertions.go:971
↓ 15 callersFunctionRegexp
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 callersFunctionincludeElement
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 callersMethodparseExpression
(bindingPower int)
parser.go:145
↓ 14 callersMethodError
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 callersMethodErrorf
(format string, args ...interface{})
internal/testify/require/requirements.go:5
↓ 14 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/assert/assertions.go:1095
↓ 14 callersMethodOnce
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 callersFunctiondiff
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 callersFunctionisFalse
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 callersFunctionJSONEq
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 callersFunctionRun
Run takes a testing suite and runs all of the tests attached to it.
internal/testify/suite/suite.go:83
↓ 13 callersFunctionYAMLEq
YAMLEq asserts that two YAML strings are equivalent.
internal/testify/assert/assertions.go:1476
↓ 12 callersFunctionNotSubset
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 callersMethodT
()
internal/testify/suite/interfaces.go:8
↓ 12 callersMethodnext
()
lexer.go:122
↓ 11 callersFunctionJSONEq
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 callersFunctionLen
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 callersFunctionSubset
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 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/assert/assertions.go:1043
↓ 11 callersFunctionYAMLEq
YAMLEq asserts that two YAML strings are equivalent.
internal/testify/require/require.go:1534
↓ 10 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/assert/assertion_forward.go:102
↓ 10 callersMethodJSONEq
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 callersMethodJSONEq
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 callersMethodLen
()
functions.go:89
↓ 10 callersFunctionNewParser
NewParser creates a new JMESPath parser.
parser.go:119
↓ 10 callersFunctionNotContains
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 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/assert/assertion_forward.go:854
↓ 10 callersMethodTheExampleMethod
(a, b, c int)
internal/testify/mock/mock_test.go:22
↓ 10 callersMethodYAMLEq
YAMLEq asserts that two YAML strings are equivalent.
internal/testify/assert/assertion_forward.go:1203
↓ 10 callersMethodYAMLEq
YAMLEq asserts that two YAML strings are equivalent.
internal/testify/require/require_forward.go:1204
↓ 9 callersMethodadvance
()
parser.go:573
↓ 9 callersFunctionobjsEqual
ObjsEqual is a generic object equality check. It will take two arbitrary objects and recursively determine if they are equal.
util.go:50
↓ 9 callersFunctionrunLexBenchmark
(b *testing.B, expression string)
lexer_test.go:156
↓ 9 callersFunctionrunParseBenchmark
(b *testing.B, expression string)
parser_test.go:131
↓ 8 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:105
↓ 8 callersFunctionDirExists
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 callersFunctionExactly
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 callersFunctionFileExists
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 callersFunctionHTTPSuccess
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 callersMethodInt
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 callersFunctionNoDirExists
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 callersFunctionNoFileExists
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 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/assert/assertion_forward.go:1185
↓ 8 callersFunctiondidPanic
didPanic returns true if the function passed to it panics. Otherwise, it returns false.
internal/testify/assert/assertions.go:945
↓ 8 callersFunctiongetTempSymlinkPath
(file string)
internal/testify/assert/assertions_test.go:1542
↓ 8 callersMethodparseProjectionRHS
(bindingPower int)
parser.go:542
↓ 7 callersMethodAssertCalled
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 callersMethodContains
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 callersFunctionError
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 callersMethodInDelta
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 callersFunctionInDeltaSlice
InDeltaSlice is the same as InDelta, except it compares two slices.
internal/testify/assert/assertions.go:1124
↓ 7 callersMethodLogf
(format string, args ...interface{})
internal/testify/mock/mock.go:21
↓ 7 callersFunctionNotRegexp
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 callersFunctionNotSame
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 callersFunctionPanicsWithError
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 callersFunctionPanicsWithValue
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 callersFunctionSame
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