Skip to content

Conversation

@odubajDT
Copy link
Contributor

Link to tracking issue

Part of #43555

…_keys functions

Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
@odubajDT odubajDT marked this pull request as ready for review October 23, 2025 03:42
Comment on lines +41 to +48
keySet := make(map[string]struct{}, len(keys))
for _, key := range keys {
k, err := key.Get(ctx, tCtx)
if err != nil {
return nil, err
}
keySet[k] = struct{}{}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should check if the getter is a literal so that we can avoid making a new map on each pass if we don't need to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants