I have reduced the code in main.go and implemented dependency injection (DI) using dig.
Scope of Impact
cmd/server/main.go
internal/server/infrastructure/di
internal/server/server.go
Particular points to check
I'd like a review to see if the DI implementation is appropriate and if reducing the code in main.go by this approach is effective.
Test
$ make send_message
RABBITMQ_URL=amqp://guest:guest@localhost:5672/ go run ./cmd/client --log-level=debug --source-service=client --destination-service=server --request-type=POST --content="Hello World!"
2024/11/12 00:20:06 Received response: code: 0, message: OK
Issue Number
38
Implementation Summary
I have reduced the code in
main.go
and implemented dependency injection (DI) usingdig
.Scope of Impact
cmd/server/main.go
internal/server/infrastructure/di
internal/server/server.go
Particular points to check
I'd like a review to see if the DI implementation is appropriate and if reducing the code in
main.go
by this approach is effective.Test