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

simplify conversions from slice to array #5818

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

snowcrumble
Copy link
Contributor

@snowcrumble snowcrumble commented Sep 13, 2024

Go 1.17 introduced an expression for convertion from slice to array, so codes can be simplified.
Ref: https://tip.golang.org/ref/spec#Conversions_from_slice_to_array_or_array_pointer

Converting a slice to an array yields an array containing the elements of the underlying array of the slice.

Copy link

linux-foundation-easycla bot commented Sep 13, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: snowcrumble / name: Lijingfeng (aa86493, b910c49)
  • ✅ login: dmathieu / name: Damien Mathieu (f43de35)

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.5%. Comparing base (38b9734) to head (f43de35).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #5818   +/-   ##
=====================================
  Coverage   84.5%   84.5%           
=====================================
  Files        272     272           
  Lines      22776   22756   -20     
=====================================
- Hits       19256   19248    -8     
+ Misses      3177    3165   -12     
  Partials     343     343           

see 1 file with indirect coverage changes

@pellared pellared added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Sep 13, 2024
@dmathieu dmathieu changed the title simplify convertions from slice to array simplify conversions from slice to array Sep 16, 2024
@pellared pellared merged commit a7e83aa into open-telemetry:main Sep 16, 2024
31 checks passed
@MrAlias MrAlias added this to the v1.31.0 milestone Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants