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, )
| 779 | // matchSingleModuleInclude tries a match without the first element in the path, |
| 780 | // so that "foo" can match "my-module:foo" |
| 781 | func 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 | |
| 796 | func matchWorkspaceIncludePath( |
| 797 | ctx context.Context, |
no test coverage detected