MCPcopy
hub / github.com/livebud/bud / In

Method In

internal/is/is.go:107–114  ·  view source on GitHub ↗

In asserts that item is contained within list.

(list interface{}, item interface{}, args ...interface{})

Source from the content-addressed store, hash-verified

105
106// In asserts that item is contained within list.
107func (is *I) In(list interface{}, item interface{}, args ...interface{}) {
108 ok, found := containsElement(list, item)
109 if !ok {
110 is.logf("%s is not a list%s", is.valWithType(list), is.formatArgs(args))
111 } else if !found {
112 is.logf("%v not in %+v%s", item, list, is.formatArgs(args))
113 }
114}
115
116// NotIn asserts that item is not contained within list
117func (is *I) NotIn(list interface{}, item interface{}, args ...interface{}) {

Callers 15

TestNoProjectFunction · 0.80
TestEmptyBuildFunction · 0.80
TestPublicFunction · 0.80
TestSyntaxErrorFunction · 0.80
TestIndexStringFunction · 0.80
TestDependencyRequestFunction · 0.80
TestEmptyActionWithViewFunction · 0.80
TestCustomActionsFunction · 0.80
TestHelloFunction · 0.80
TestHelloEmbedFunction · 0.80
TestChunksFunction · 0.80

Calls 4

logfMethod · 0.95
valWithTypeMethod · 0.95
formatArgsMethod · 0.95
containsElementFunction · 0.85

Tested by 15

TestNoProjectFunction · 0.64
TestEmptyBuildFunction · 0.64
TestPublicFunction · 0.64
TestSyntaxErrorFunction · 0.64
TestIndexStringFunction · 0.64
TestDependencyRequestFunction · 0.64
TestEmptyActionWithViewFunction · 0.64
TestCustomActionsFunction · 0.64
TestHelloFunction · 0.64
TestHelloEmbedFunction · 0.64
TestChunksFunction · 0.64