-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improving rule r0006 #410
Improving rule r0006 #410
Conversation
Signed-off-by: Amit Schendel <[email protected]>
|
||
// normalizeTokenPath removes timestamp directories from the path while maintaining | ||
// the essential structure. Optimized for minimal allocations. | ||
func normalizeTokenPath(path string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have a time constraint on this? because splitting and joining strings are really wasteful
you can check how much fun we had with indexing strings in https://github.com/kubescape/storage/blob/2b75b33130a55255df7575dc473a49858e3e325d/pkg/registry/file/dynamicpathdetector/analyzer.go#L137
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a better suggestion? I am not that worried about performance because we first filter the prefix, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just check the comment regarding performance
Summary:
|
Signed-off-by: Amit Schendel <[email protected]>
Summary:
|
Signed-off-by: Amit Schendel <[email protected]>
Summary:
|
Signed-off-by: Amit Schendel <[email protected]>
Summary:
|
Signed-off-by: Amit Schendel <[email protected]>
Summary:
|
Signed-off-by: Amit Schendel <[email protected]>
Summary:
|
Overview