Skip to content

Commit 9fecd8a

Browse files
committed
revise docs
Signed-off-by: JasmineTang <jasminetang@microsoft.com>
1 parent 9352d58 commit 9fecd8a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

extendedcopy.go

+3-8
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,9 @@ func findRoots(ctx context.Context, storage content.ReadOnlyGraphStorage, node o
176176
return roots, nil
177177
}
178178

179-
// FilterAnnotation will configure opts.FindPredecessors to filter the predecessors
180-
// whose annotation matches a given regex pattern. For each predecessor,
181-
// - If key is available in the predecessor's annotation and regex is not nil,
182-
// return the predecessor if the annotation value matches the regex.
183-
// - If key is available in the predecessor's annotation and regex is nil,
184-
// return the predecessor.
185-
// - If key is unavailable in the predecessor's annotation, the predecessor
186-
// will not be returned.
179+
// FilterAnnotation will configure opts.FindPredecessors to filter the
180+
// predecessors whose annotation matches a given regex pattern. A predecessor is
181+
// kept if the key is in its annotation and matches the regex if present.
187182
// For performance consideration, when using both FilterArtifactType and
188183
// FilterAnnotation, it's recommended to call FilterArtifactType first.
189184
func (opts *ExtendedCopyGraphOptions) FilterAnnotation(key string, regex *regexp.Regexp) {

0 commit comments

Comments
 (0)