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

Function matchSingleModuleInclude

core/schema/workspace.go:781–794  ·  view source on GitHub ↗

matchSingleModuleInclude tries a match without the first element in the path, so that "foo" can match "my-module:foo"

(
	ctx context.Context,
	node *core.ModTreeNode,
	include []string,
)

Source from the content-addressed store, hash-verified

779// matchSingleModuleInclude tries a match without the first element in the path,
780// so that "foo" can match "my-module:foo"
781func matchSingleModuleInclude(
782 ctx context.Context,
783 node *core.ModTreeNode,
784 include []string,
785) (bool, error) {
786 if node == nil {
787 return false, nil
788 }
789 path := node.Path()
790 if len(path) < 2 {
791 return false, nil
792 }
793 return matchWorkspaceIncludePath(ctx, path[1:], include)
794}
795
796func matchWorkspaceIncludePath(
797 ctx context.Context,

Callers 3

filterNodesByExcludeFunction · 0.85
filterNodesByIncludeFunction · 0.85

Calls 2

PathMethod · 0.45

Tested by

no test coverage detected