Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, computeRoutePrefix was adding a '/' to the start of the prefix and then removing it from the end, regardless of whether it was there or not. This resulted in unnecessary string operations. The updated function only adds or removes the '/' when necessary, improving efficiency. Additionally, the function now uses strings.HasPrefix and strings.HasSuffix for clearer intent and readability. Signed-off-by: donuts-are-good <[email protected]>
- Loading branch information