go-clang / gen

Generate Go bindings for Clang's C API
https://pkg.go.dev/github.com/go-clang/gen
BSD 3-Clause "New" or "Revised" License
44 stars 5 forks source link

Use switch...case instead of if...else #167

Closed zchee closed 3 years ago

zchee commented 3 years ago

Use switch...case instead of if...else for readability. Also, fix typo and use strings.EqualFold for compare string.

codecov[bot] commented 3 years ago

Codecov Report

Merging #167 (50ff2ca) into main (3d81a36) will increase coverage by 0.1%. The diff coverage is 26.1%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #167     +/-   ##
=======================================
+ Coverage   11.3%   11.4%   +0.1%     
=======================================
  Files         19      19             
  Lines       2500    2515     +15     
=======================================
+ Hits         284     289      +5     
- Misses      2216    2226     +10     
Impacted Files Coverage Δ
ast.go 0.0% <0.0%> (ø)
clang/cmd.go 0.0% <0.0%> (ø)
clang/util.go 0.0% <ø> (ø)
comment.go 93.7% <ø> (ø)
enum.go 0.0% <0.0%> (ø)
file.go 0.0% <0.0%> (ø)
function.go 19.5% <0.0%> (-0.3%) :arrow_down:
generation.go 2.7% <0.0%> (+<0.1%) :arrow_up:
naming.go 9.0% <0.0%> (-0.5%) :arrow_down:
type.go 16.6% <35.7%> (-0.5%) :arrow_down:
... and 7 more

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 3d81a36...50ff2ca. Read the comment docs.