Skip to content
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

Use strings.Cut() instead of string.SplitN() #3822

Merged
merged 1 commit into from
May 21, 2023

Conversation

ash2k
Copy link
Contributor

@ash2k ash2k commented May 19, 2023

strings.Cut() generates less garbage as it does not allocate the slice to hold parts. See also open-telemetry/opentelemetry-go#4049.

@ash2k ash2k requested a review from a team May 19, 2023 08:30
strings.Cut() generates less garbage as it does not allocate the slice to hold parts.
@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #3822 (3ece61b) into main (95167fd) will not change coverage.
The diff coverage is 100.0%.

❗ Current head 3ece61b differs from pull request most recent head f7259c6. Consider uploading reports for the commit f7259c6 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #3822   +/-   ##
=====================================
  Coverage   70.1%   70.1%           
=====================================
  Files        149     149           
  Lines       7133    7133           
=====================================
  Hits        5004    5004           
  Misses      1998    1998           
  Partials     131     131           
Impacted Files Coverage Δ
.../google.golang.org/grpc/otelgrpc/internal/parse.go 100.0% <100.0%> (ø)

@MrAlias MrAlias merged commit b800830 into open-telemetry:main May 21, 2023
@ash2k ash2k deleted the ash2k/ctrings-cut branch May 22, 2023 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants