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

fix(cmd/proto-gen-http): non nil assertion for error #1700

Merged
merged 1 commit into from Dec 20, 2021

Conversation

JerryZhou343
Copy link
Contributor

修复: errors 插件生成的代码中, Isxxx 判断函数未对 入参 err 进行空判断。

@Cluas Cluas closed this Dec 18, 2021
@Cluas Cluas reopened this Dec 18, 2021
@codecov-commenter
Copy link

codecov-commenter commented Dec 18, 2021

Codecov Report

Merging #1700 (0f51900) into main (32158bc) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1700      +/-   ##
==========================================
+ Coverage   81.08%   81.11%   +0.02%     
==========================================
  Files          78       78              
  Lines        3431     3431              
==========================================
+ Hits         2782     2783       +1     
  Misses        445      445              
+ Partials      204      203       -1     
Impacted Files Coverage Δ
internal/context/context.go 97.01% <0.00%> (-2.99%) ⬇️
selector/node/ewma/node.go 87.09% <0.00%> (+3.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32158bc...0f51900. Read the comment docs.

daemon365
daemon365 previously approved these changes Dec 19, 2021
Cluas
Cluas previously approved these changes Dec 19, 2021
@shenqidebaozi
Copy link
Sponsor Member

貌似一些其他库或者标准库里面都没有对nil 做判断。一般应该都是外面判断之后传进来?

@Casper-Mars
Copy link
Contributor

貌似一些其他库或者标准库里面都没有对nil 做判断。一般应该都是外面判断之后传进来?

标准库errors.Is是有判断nil的

@shenqidebaozi shenqidebaozi changed the title fix:对err 进行空判断,增加代码健壮性 fix(cmd/proto-gen-http): non nil assertion for error Dec 20, 2021
@shenqidebaozi shenqidebaozi dismissed stale reviews from Cluas and daemon365 December 20, 2021 02:03

miss indent

@shenqidebaozi shenqidebaozi merged commit 94d674f into go-kratos:main Dec 20, 2021
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.

None yet

6 participants