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

refactor: replace all interface{} with any in go1.18 #16

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

longyue0521
Copy link
Contributor

  1. go.mod中约定的go最小版本为1.18
  2. 在go 1.18中可以使用any替代interface{}, https://pkg.go.dev/builtin#any
  3. 在根目录下使用gofmt -w -r 'interface{} -> any' .完成替换, 使用find . -name "*.go"|xargs grep "interface{}"检查替换结果

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (3b8df59) 77.56983% compared to head (da65610) 77.87709%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main         #16         +/-   ##
===================================================
+ Coverage   77.56983%   77.87709%   +0.30725%     
===================================================
  Files             45          45                 
  Lines           3580        3580                 
===================================================
+ Hits            2777        2788         +11     
+ Misses           587         579          -8     
+ Partials         216         213          -3     
Flag Coverage Δ
unittests 77.87709% <97.14286%> (+0.30725%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
internal/asynctimer/asynctimer.go 87.12121% <100.00000%> (ø)
internal/buffer/buffer.go 82.24101% <100.00000%> (ø)
internal/buffer/node.go 100.00000% <100.00000%> (ø)
internal/cache/mcache/mcache.go 90.00000% <100.00000%> (ø)
internal/cache/systype/systype.go 88.73239% <100.00000%> (ø)
internal/netutil/fd.go 82.35294% <100.00000%> (ø)
internal/poller/desc.go 66.66667% <ø> (ø)
log/log.go 100.00000% <100.00000%> (ø)
netfd.go 77.98165% <ø> (+3.66971%) ⬆️
taskpool.go 100.00000% <100.00000%> (ø)
... and 5 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@WineChord WineChord left a comment

Choose a reason for hiding this comment

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

LGTM

@WineChord WineChord merged commit ed8bb2a into trpc-group:main Nov 29, 2023
6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants