pingcap / failpoint

An implementation of failpoints for Golang.
Apache License 2.0
817 stars 63 forks source link

code: add support for failpoint.Inject("failpoint-name", nil) and Return marker function #19

Closed lonng closed 5 years ago

lonng commented 5 years ago

Signed-off-by: Lonng chris@lonng.org

What problem does this PR solve?

What is changed and how it works?

Add support for nil closure, which will generate a failpoint.Eval(...) call instead of an IF statement.

Check List

Tests

Side effects

N/A

Related changes

N/A

codecov[bot] commented 5 years ago

Codecov Report

Merging #19 into master will increase coverage by 0.124%. The diff coverage is 100%.

@@               Coverage Diff               @@
##             master        #19       +/-   ##
===============================================
+ Coverage   78.5133%   78.6374%   +0.124%     
===============================================
  Files             7          7               
  Lines           861        866        +5     
===============================================
+ Hits            676        681        +5     
  Misses          109        109               
  Partials         76         76