MCPcopy Create free account
hub / github.com/dagger/dagger / Contains

Method Contains

core/modtree.go:744–754  ·  view source on GitHub ↗
(ctx context.Context, target ModTreePath)

Source from the content-addressed store, hash-verified

742}
743
744func (p ModTreePath) Contains(ctx context.Context, target ModTreePath) (result bool) {
745 defer func() {
746 debugTrace(ctx, "%v.Contains(%v) -> %v", p, target, result)
747 }()
748 if len(target) < len(p) {
749 // if the target is shorter, it can't be a sub-path
750 return false
751 }
752 targetParent := target[:len(p)]
753 return p.Equals(ctx, targetParent)
754}
755
756func (p ModTreePath) Equals(ctx context.Context, other ModTreePath) (result bool) {
757 defer func() {

Callers 2

MatchMethod · 0.95

Calls 2

EqualsMethod · 0.95
debugTraceFunction · 0.85

Tested by

no test coverage detected