Skip to content

Conversation

@dohernandez
Copy link
Owner

Extract and refactor code to reduce the boiler code on the base code.

@dohernandez
Copy link
Owner Author

dohernandez commented Dec 7, 2024

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Docker ignore 1 16 (+1) 9 (+1) 3 4 0 169B (+5B)
Dockerfile 1 (-1) 36 (-5) 18 (-3) 7 11 (-2) 2 1.2K (-85B)
Go 17 (-23) 250 (-1598) 153 (-1126) 46 (-163) 51 (-309) 8 (-133) 6.7K (-37.3K)
Go (test) 2 (-5) 135 (-502) 104 (-384) 8 (-2) 23 (-116) 1 (-24) 3.6K (-10.8K)
Makefile 1 (-3) 112 (-23) 70 (-19) 17 25 (-4) 9 (+1) 4.1K (-862B)
Markdown 4 (+1) 301 (+122) 221 (+88) 0 80 (+34) 0 12.6K (+5.6K)
Protocol Buffers 10 1925 (-11) 412 1380 (-11) 133 0 70K (-287B)
SQL 2 (+2) 2 (+2) 2 (+2) 0 0 0 80B (+80B)
Shell 1 (-3) 47 (-65) 37 (-36) 1 (-15) 9 (-14) 0 (-12) 2.6K (-2K)
YAML 10 (+1) 668 (+109) 558 (+60) 43 (+6) 67 (+43) 0 23.1K (+5.2K)

@github-actions
Copy link

github-actions bot commented Dec 7, 2024

Go API Changes

# summary
Inferred base version: none
Suggested version: v0.1.0

@dohernandez
Copy link
Owner Author

Unit Test Coverage

total: (statements) 0.0%
changed lines: (statements) 0.0%, coverage is less than 90.0%, consider testing the changes more thoroughly

Coverage of changed lines
File Function Coverage
Total 0.0%
cmd/kit-template/main.go 0.0%
cmd/kit-template/main.go:19 main 0.0%
internal/platform/app/init.go 0.0%
internal/platform/app/init.go:23 NewServiceLocator 0.0%
internal/platform/app/init.go:58 setupServices 0.0%
internal/platform/service/grpc.go 0.0%
internal/platform/service/grpc.go:23 NewKitTemplateService 0.0%
internal/platform/service/register.go 0.0%
internal/platform/service/register.go:14 RegisterServiceHandler 0.0%
dev.go no coverage
internal/platform/config/config.go no coverage
resources/swagger/static.go no coverage
Coverage diff with base branch
File Function Base Coverage Current Coverage
Total 35.1% 0.0% (-35.1%)
internal/platform/app/graceful.go GracefulDBShutdown 0.0% no function
internal/platform/app/init.go ZapLogger 0.0% no function
internal/platform/app/init.go makeDB 0.0% no function
internal/platform/app/init.go makeDBx 0.0% no function
internal/platform/app/init.go makeStorage 0.0% no function
internal/platform/app/init.go setGRPCUnitaryInterceptors 0.0% no function
internal/platform/app/init.go setLogger 0.0% no function
internal/platform/app/init.go setupStorage no function 0.0%
internal/platform/config/config.go GetConfig 75.0% no function
internal/platform/config/config.go IsDev 0.0% no function
internal/platform/config/config.go IsTest 0.0% no function
internal/platform/config/config.go WithEnvFiles 85.7% no function
internal/platform/config/config.go fileExists 75.0% no function
internal/platform/handler/provider.go AppendStandardHandlers 0.0% no function
internal/platform/handler/provider.go SetResponseModifier 0.0% no function
internal/platform/handler/provider.go appendAPIDocsHandlers 0.0% no function
internal/platform/handler/provider.go appendRootHandlers 0.0% no function
internal/platform/service/grpc.go NewKitTemplateService no function 0.0%
internal/platform/service/grpc_register.go RegisterService 0.0% no function
internal/platform/service/grpc_service.go NewKitTemplateService 0.0% no function
internal/platform/service/register.go RegisterService no function 0.0%
internal/platform/service/register.go RegisterServiceHandler no function 0.0%
internal/platform/service/rest_register.go RegisterHandlerService 0.0% no function
internal/platform/service/rest_register.go WithUnaryServerInterceptor 0.0% no function
internal/platform/service/rest_service.go NewKitTemplateRESTService 0.0% no function
pkg/grpc/metrics/init.go NewMetricsService 0.0% no function
pkg/grpc/metrics/metrics.go Addr 0.0% no function
pkg/grpc/metrics/metrics.go Listener 0.0% no function
pkg/grpc/metrics/metrics.go Name 0.0% no function
pkg/grpc/metrics/metrics.go NewServer 100.0% no function
pkg/grpc/metrics/metrics.go ServerMetrics 0.0% no function
pkg/grpc/metrics/metrics.go Start 78.6% no function
pkg/grpc/metrics/metrics.go WithAddrAssigned 0.0% no function
pkg/grpc/metrics/metrics.go WithAddress 100.0% no function
pkg/grpc/metrics/metrics.go WithListener 100.0% no function
pkg/grpc/metrics/metrics.go WithPort 100.0% no function
pkg/grpc/metrics/metrics.go WithShutdownSignal 100.0% no function
pkg/grpc/metrics/metrics.go defaultConfig 100.0% no function
pkg/grpc/metrics/metrics.go handleServerShutdown 71.4% no function
pkg/grpc/metrics/metrics.go listen 100.0% no function
pkg/grpc/rest/init.go InitRESTService 0.0% no function
pkg/grpc/rest/rest.go Addr 0.0% no function
pkg/grpc/rest/rest.go Listener 0.0% no function
pkg/grpc/rest/rest.go Name 0.0% no function
pkg/grpc/rest/rest.go NewServer 60.0% no function
pkg/grpc/rest/rest.go Start 75.0% no function
pkg/grpc/rest/rest.go WithAddrAssigned 0.0% no function
pkg/grpc/rest/rest.go WithAddress 100.0% no function
pkg/grpc/rest/rest.go WithHandlerPathOption 0.0% no function
pkg/grpc/rest/rest.go WithListener 100.0% no function
pkg/grpc/rest/rest.go WithPort 100.0% no function
pkg/grpc/rest/rest.go WithServerMuxOption 0.0% no function
pkg/grpc/rest/rest.go WithService 0.0% no function
pkg/grpc/rest/rest.go WithShutdownSignal 100.0% no function
pkg/grpc/rest/rest.go defaultConfig 100.0% no function
pkg/grpc/rest/rest.go handleServerShutdown 71.4% no function
pkg/grpc/rest/rest.go listen 100.0% no function
pkg/grpc/server/init.go InitGRPCService 0.0% no function
pkg/grpc/server/server.go Addr 0.0% no function
pkg/grpc/server/server.go ChainStreamInterceptor 100.0% no function
pkg/grpc/server/server.go ChainUnaryInterceptor 100.0% no function
pkg/grpc/server/server.go Listener 0.0% no function
pkg/grpc/server/server.go Name 0.0% no function
pkg/grpc/server/server.go NewServer 75.0% no function
pkg/grpc/server/server.go Start 60.0% no function
pkg/grpc/server/server.go WithAddrAssigned 0.0% no function
pkg/grpc/server/server.go WithAddress 100.0% no function
pkg/grpc/server/server.go WithListener 100.0% no function
pkg/grpc/server/server.go WithMetrics 0.0% no function
pkg/grpc/server/server.go WithPort 100.0% no function
pkg/grpc/server/server.go WithReflective 0.0% no function
pkg/grpc/server/server.go WithServerOption 100.0% no function
pkg/grpc/server/server.go WithService 0.0% no function
pkg/grpc/server/server.go WithShutdownSignal 100.0% no function
pkg/grpc/server/server.go defaultConfig 100.0% no function
pkg/grpc/server/server.go handleServerShutdown 83.3% no function
pkg/grpc/server/server.go listen 100.0% no function
pkg/must/notfail.go NotFail 0.0% no function
pkg/servicing/servicing.go Close 0.0% no function
pkg/servicing/servicing.go Start 0.0% no function
pkg/servicing/servicing.go WithGracefulSutDown 0.0% no function
pkg/test/feature/database/steps.go RegisterSteps 0.0% no function
pkg/test/feature/database/steps.go cleanUpTable 0.0% no function
pkg/test/feature/database/steps.go isForeignKeyViolation 0.0% no function
pkg/test/feature/database/steps.go thereIsACleanDatabase 0.0% no function
pkg/test/feature/feature.go RunFeatures 0.0% no function
pkg/test/feature/feature.go init 100.0% no function

@dohernandez dohernandez force-pushed the feat/reduce-code-definition branch from 9f37734 to 5cc1663 Compare December 7, 2024 16:40
@dohernandez dohernandez force-pushed the feat/reduce-code-definition branch from c031544 to 7f0fb28 Compare December 7, 2024 16:53
@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@dohernandez dohernandez force-pushed the feat/reduce-code-definition branch 3 times, most recently from 28b1d52 to 591b43f Compare December 7, 2024 18:42
@dohernandez
Copy link
Owner Author

Integration Test Coverage

total: (statements) 85.0%
changed lines: (statements) 94.4%

Coverage of changed lines
File Function Coverage
Total 94.4%
internal/platform/app/init.go 93.8%
internal/platform/app/init.go:23 NewServiceLocator 100.0%
internal/platform/app/init.go:58 setupServices 98.2%
internal/platform/service/grpc.go 100.0%
internal/platform/service/grpc.go:23 NewKitTemplateService 100.0%
internal/platform/service/register.go 100.0%
internal/platform/service/register.go:14 RegisterServiceHandler 100.0%
cmd/kit-template/main.go no coverage
dev.go no coverage
internal/platform/config/config.go no coverage
resources/swagger/static.go no coverage
Coverage diff with base branch
File Function Base Coverage Current Coverage
Total 67.4% 85.0% (+17.6%)
github.com/dohernandez/kit-template/internal/platform/app/graceful.go GracefulDBShutdown 50.0% no function
github.com/dohernandez/kit-template/internal/platform/app/init.go NewServiceLocator 93.8% 83.3% (-10.5%)
github.com/dohernandez/kit-template/internal/platform/app/init.go ZapLogger 100.0% no function
github.com/dohernandez/kit-template/internal/platform/app/init.go makeDB 83.3% no function
github.com/dohernandez/kit-template/internal/platform/app/init.go makeDBx 75.0% no function
github.com/dohernandez/kit-template/internal/platform/app/init.go makeStorage 80.0% no function
github.com/dohernandez/kit-template/internal/platform/app/init.go setGRPCUnitaryInterceptors 100.0% no function
github.com/dohernandez/kit-template/internal/platform/app/init.go setLogger 100.0% no function
github.com/dohernandez/kit-template/internal/platform/app/init.go setupServices 100.0% 83.3% (-16.7%)
github.com/dohernandez/kit-template/internal/platform/app/init.go setupStorage no function 0.0%
github.com/dohernandez/kit-template/internal/platform/config/config.go GetConfig 75.0% no function
github.com/dohernandez/kit-template/internal/platform/config/config.go IsDev 100.0% no function
github.com/dohernandez/kit-template/internal/platform/config/config.go IsTest 0.0% no function
github.com/dohernandez/kit-template/internal/platform/config/config.go WithEnvFiles 85.7% no function
github.com/dohernandez/kit-template/internal/platform/config/config.go fileExists 75.0% no function
github.com/dohernandez/kit-template/internal/platform/handler/provider.go AppendStandardHandlers 100.0% no function
github.com/dohernandez/kit-template/internal/platform/handler/provider.go SetResponseModifier 8.3% no function
github.com/dohernandez/kit-template/internal/platform/handler/provider.go appendAPIDocsHandlers 22.2% no function
github.com/dohernandez/kit-template/internal/platform/handler/provider.go appendRootHandlers 25.0% no function
github.com/dohernandez/kit-template/internal/platform/service/grpc.go NewKitTemplateService no function 100.0%
github.com/dohernandez/kit-template/internal/platform/service/grpc_register.go RegisterService 0.0% no function
github.com/dohernandez/kit-template/internal/platform/service/grpc_service.go NewKitTemplateService 100.0% no function
github.com/dohernandez/kit-template/internal/platform/service/register.go RegisterService no function 0.0%
github.com/dohernandez/kit-template/internal/platform/service/register.go RegisterServiceHandler no function 100.0%
github.com/dohernandez/kit-template/internal/platform/service/rest_register.go RegisterHandlerService 100.0% no function
github.com/dohernandez/kit-template/internal/platform/service/rest_register.go WithUnaryServerInterceptor 100.0% no function
github.com/dohernandez/kit-template/internal/platform/service/rest_service.go NewKitTemplateRESTService 100.0% no function

@dohernandez dohernandez force-pushed the feat/reduce-code-definition branch from 591b43f to 7d64713 Compare December 7, 2024 18:47
@dohernandez dohernandez merged commit c5c329d into main Dec 7, 2024
5 of 6 checks passed
@dohernandez dohernandez deleted the feat/reduce-code-definition branch December 7, 2024 18:52
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.

3 participants