MCPcopy Index your code

hub / github.com/PhakornKiong/go-pattern-match / functions

Functions117 in github.com/PhakornKiong/go-pattern-match

↓ 116 callersMethodMatch
(any)
pattern/matcher.go:8
↓ 69 callersFunctionString
()
pattern/string.go:18
↓ 58 callersMethodOtherwise
Otherwise is called if no patterns match
pattern/matcher.go:130
↓ 47 callersMethodWithPattern
WithPattern check if pattern matches the entire input
pattern/matcher.go:36
↓ 42 callersFunctionInt
()
pattern/int.go:15
↓ 32 callersMethodContains
(value string)
pattern/string.go:57
↓ 19 callersMethodEndsWith
(value string)
pattern/string.go:39
↓ 19 callersFunctionUnionPattern
(patterns ...V)
pattern/union.go:28
↓ 18 callersMethodGt
(min int)
pattern/int.go:31
↓ 17 callersFunctionMap
()
pattern/map.go:19
↓ 17 callersFunctionUnion
(patterns ...V)
pattern/union.go:11
↓ 16 callersMethodKeyVal
(key K, val V)
pattern/map.go:32
↓ 16 callersMethodMinLength
(value int)
pattern/string.go:45
↓ 15 callersMethodWithValues
WithValues check for deep equality between each of the value against the each of the input
pattern/matcher.go:72
↓ 14 callersFunctionIntersectionPattern
(patterns ...V)
pattern/intersection.go:28
↓ 13 callersFunctionNot
(pattern any)
pattern/not.go:9
↓ 13 callersFunctionStruct
()
pattern/struct.go:22
↓ 11 callersMethodFieldPattern
(fieldName string, p Patterner)
pattern/struct.go:39
↓ 11 callersFunctionIntersection
(patterns ...V)
pattern/intersection.go:11
↓ 10 callersMethodVal
(val V)
pattern/map.go:44
↓ 10 callersMethodWithValue
WithValue check for deep equality between the value and the input
pattern/matcher.go:117
↓ 9 callersMethodStartsWith
(value string)
pattern/string.go:33
↓ 9 callersMethodWithPatterns
WithPatterns check each of the patterns against the each of the input
pattern/matcher.go:44
↓ 8 callersMethodFieldValue
(fieldName string, v any)
pattern/struct.go:33
↓ 8 callersFunctionPatteners
(patterns ...Patterner)
pattern/matcher.go:11
↓ 7 callersMethodLt
(max int)
pattern/int.go:25
↓ 7 callersMethodMaxLength
(value int)
pattern/string.go:51
↓ 7 callersMethodRegex
(value *regexp.Regexp)
pattern/string.go:63
↓ 6 callersFunctionAny
()
pattern/any.go:6
↓ 6 callersMethodKey
(key K)
pattern/map.go:38
↓ 6 callersMethodKeyValPatterns
(key K, p Patterner)
pattern/map.go:50
↓ 6 callersMethodclone
()
pattern/string.go:22
↓ 6 callersMethodclone
()
pattern/slice.go:18
↓ 5 callersMethodContainsPattern
(p Patterner)
pattern/slice.go:59
↓ 5 callersFunctionmatch
(input string)
example/string/main.go:10
↓ 5 callersFunctionshippingStrategyFactory
(o Order)
example/shippingStrategy/main.go:27
↓ 5 callersFunctionshippingStrategyFactoryPattern
(o Order)
example/shippingStrategy/main.go:61
↓ 4 callersFunctionFib
(input int)
example/fibonacci/main.go:9
↓ 4 callersFunctionFoodSorterWithPattern
(input string)
example/switchunion/main.go:22
↓ 4 callersMethodHead
(v V)
pattern/slice.go:29
↓ 4 callersMethodTailPattern
(p Patterner)
pattern/slice.go:47
↓ 4 callersMethodclone
()
pattern/map.go:23
↓ 4 callersFunctionmatch
(input string)
example/withInput/main.go:9
↓ 4 callersMethodpatternMatched
(fn Handler[T])
pattern/matcher.go:137
↓ 3 callersMethodBetween
(min, max int)
pattern/int.go:19
↓ 3 callersMethodGte
(min int)
pattern/int.go:43
↓ 3 callersMethodHeadPattern
(p Patterner)
pattern/slice.go:35
↓ 3 callersMethodLte
(max int)
pattern/int.go:37
↓ 3 callersMethodTail
(v V)
pattern/slice.go:41
↓ 3 callersFunctionmatch
(input []int)
example/slice/main.go:9
↓ 3 callersFunctionmatch
(input []int)
example/withvalues/main.go:9
↓ 2 callersMethodNegative
()
pattern/int.go:55
↓ 2 callersFunctionNewAirStrategy
(distance, weight, volume int)
example/shippingStrategy/air.go:14
↓ 2 callersFunctionNewDefaultStrategy
()
example/shippingStrategy/default.go:10
↓ 2 callersFunctionNewFreightStrategy
(distance, weight, volume int)
example/shippingStrategy/freight.go:14
↓ 2 callersFunctionNewLocalStrategy
(distance, weight int)
example/shippingStrategy/local.go:13
↓ 2 callersFunctionNotPattern
(pattern V)
pattern/not.go:21
↓ 2 callersMethodPositive
()
pattern/int.go:49
↓ 2 callersFunctionWhen
(predicate Predicate[V])
pattern/when.go:9
↓ 2 callersMethodclone
()
pattern/struct.go:26
↓ 2 callersFunctiongetFieldValue
(v reflect.Value, fieldName string)
pattern/struct.go:79
MethodCalculateCost
()
example/shippingStrategy/air.go:10
MethodCalculateCost
()
example/shippingStrategy/local.go:9
MethodCalculateCost
()
example/shippingStrategy/default.go:6
MethodCalculateCost
()
example/shippingStrategy/main.go:10
MethodCalculateCost
()
example/shippingStrategy/freight.go:10
MethodContains
(v V)
pattern/slice.go:53
FunctionFoodSorter
(input string)
example/switchunion/main.go:9
MethodMatch
(value any)
pattern/not.go:13
MethodMatch
(value any)
pattern/not.go:25
MethodMatch
(value any)
pattern/int.go:61
MethodMatch
(value any)
pattern/union.go:15
MethodMatch
(value any)
pattern/union.go:32
MethodMatch
(value any)
pattern/string.go:69
MethodMatch
(value any)
pattern/map.go:56
MethodMatch
(value any)
pattern/intersection.go:15
MethodMatch
(value any)
pattern/intersection.go:32
MethodMatch
(value any)
pattern/any.go:10
MethodMatch
(value any)
pattern/struct.go:45
MethodMatch
(value any)
pattern/when.go:13
MethodMatch
(value any)
pattern/slice.go:65
FunctionNewMatcher
NewMatcher is a function that creates a new Matcher instance. It takes a value of any type V and returns a pointer to a Matcher instance. The returned
pattern/matcher.go:31
FunctionSlice
()
pattern/slice.go:14
FunctionTestAnyPattern
(t *testing.T)
pattern/any_test.go:9
FunctionTestInt
(t *testing.T)
pattern/int_test.go:9
FunctionTestIntersection
(t *testing.T)
pattern/intersection_test.go:9
FunctionTestIntersectionPattern
(t *testing.T)
pattern/intersection_test.go:31
FunctionTestMap
(t *testing.T)
pattern/map_test.go:9
FunctionTestMatcher
(t *testing.T)
pattern/matcher_test.go:12
FunctionTestMatcher2
(t *testing.T)
pattern/matcher_test.go:25
FunctionTestMatcherWithAnyPattern
(t *testing.T)
pattern/matcher_test.go:186
FunctionTestMatcherWithIntersection
(t *testing.T)
pattern/matcher_test.go:598
FunctionTestMatcherWithNotPattern
(t *testing.T)
pattern/matcher_test.go:338
FunctionTestMatcherWithPatterns
(t *testing.T)
pattern/matcher_test.go:88
FunctionTestMatcherWithUnion
(t *testing.T)
pattern/matcher_test.go:462
FunctionTestMatcherWithValue
(t *testing.T)
pattern/matcher_test.go:38
FunctionTestMatcherWithValues
(t *testing.T)
pattern/matcher_test.go:225
FunctionTestMatcherWithWhenPattern
(t *testing.T)
pattern/matcher_test.go:413
FunctionTestNot
(t *testing.T)
pattern/not_test.go:9
FunctionTestNotPattern
(t *testing.T)
pattern/not_test.go:31
next →1–100 of 117, ranked by callers