Skip to content

Commit 298dfbc

Browse files
author
Atanas Chuchev
committed
Clarify comment on label selector parsing in newDataGathererWithClient
1 parent 2c332ff commit 298dfbc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/datagatherer/k8sdynamic/dynamic.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ func (c *ConfigDynamic) newDataGathererWithClient(ctx context.Context, cl dynami
227227
}
228228

229229
// Add any custom label selectors
230-
// The selectors have already been validated, so it is safe to use
231-
// MustParse here (Parse errors would indicate a programming error).
230+
// The selectors have already been validated, so Parse is expected to
231+
// succeed; any parse error is treated as a programming error.
232232
labelSelector := labels.Everything()
233233
for _, labelSelectorString := range c.LabelSelectors {
234234
selector, err := labels.Parse(labelSelectorString)

0 commit comments

Comments
 (0)