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

StringToByte without mem-allocation supports v1.20 #1750

Merged
merged 2 commits into from
May 16, 2023

Conversation

tylitianrui
Copy link
Contributor

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Documentation
  • Refactor
  • Chore
  • CI/CD or Tests

What this PR does / why we need it:

Since Go 1.20, the (Slice|String)Header types will be depreciated and not recommended to be used.
Two functions, unsafe.StringData and unsafe.SliceData will take over the use cases of two old reflect types.

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2023

Codecov Report

Merging #1750 (095309d) into master (4b1ad1b) will increase coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head 095309d differs from pull request most recent head 731c135. Consider uploading reports for the commit 731c135 to get more accurate results

@@            Coverage Diff             @@
##           master    #1750      +/-   ##
==========================================
+ Coverage   39.29%   39.31%   +0.02%     
==========================================
  Files          91       92       +1     
  Lines        8075     8078       +3     
==========================================
+ Hits         3173     3176       +3     
  Misses       4495     4495              
  Partials      407      407              
Impacted Files Coverage Δ
pkg/id/idgen.go 100.00% <100.00%> (ø)
pkg/utils/s2b_old.go 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tao12345666333
Copy link
Member

Thanks for your contribution.

I think we should upgrade our Go tool chain to v1.20 first.

Copy link
Member

@tao12345666333 tao12345666333 left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. We have now upgraded the Go toolchain for this project to v1.20. Can you merge the latest code from the master branch?

pkg/utils/s2b_new.go Show resolved Hide resolved
@tao12345666333 tao12345666333 merged commit 7b81a8b into apache:master May 16, 2023
@tao12345666333 tao12345666333 added this to the v1.7.0 milestone May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants