containerd / ttrpc

GRPC for low-memory environments
Apache License 2.0
536 stars 78 forks source link

Only generate a Go file if the file has some services #112

Closed kzys closed 2 years ago

kzys commented 2 years ago

Otherwise, this generator creates a Go file with some import statements, that causes "imported and not used" error.

Signed-off-by: Kazuyoshi Kato katokazu@amazon.com

codecov-commenter commented 2 years ago

Codecov Report

Merging #112 (f0fda53) into main (aa5c947) will decrease coverage by 1.97%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
- Coverage   63.87%   61.89%   -1.98%     
==========================================
  Files          11       12       +1     
  Lines        1049     1299     +250     
==========================================
+ Hits          670      804     +134     
- Misses        334      427      +93     
- Partials       45       68      +23     
Impacted Files Coverage Δ
src/github.com/containerd/ttrpc/client.go 64.06% <0.00%> (-13.22%) :arrow_down:
src/github.com/containerd/ttrpc/channel.go 73.17% <0.00%> (-8.37%) :arrow_down:
src/github.com/containerd/ttrpc/server.go 73.79% <0.00%> (-2.84%) :arrow_down:
src/github.com/containerd/ttrpc/interceptor.go 100.00% <0.00%> (ø)
src/github.com/containerd/ttrpc/stream.go 81.48% <0.00%> (ø)
src/github.com/containerd/ttrpc/services.go 60.24% <0.00%> (+12.52%) :arrow_up:

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 aa5c947...f0fda53. Read the comment docs.