1
0
mirror of https://github.com/hexolan/stocklet.git synced 2026-05-20 11:39:24 +01:00

feat: go report card

fix: comment and log misspellings
This commit is contained in:
2025-03-13 16:11:01 +00:00
parent b31f08186c
commit 25303851d5
21 changed files with 46 additions and 42 deletions
+3 -3
View File
@@ -92,7 +92,7 @@ func (c *kafkaController) Start() {
case messaging.Shipping_Shipment_Allocation_Topic:
c.consumeShipmentAllocationEventTopic(ft)
default:
log.Warn().Str("topic", ft.Topic).Msg("consumer: recieved records from unexpected topic")
log.Warn().Str("topic", ft.Topic).Msg("consumer: received records from unexpected topic")
}
})
}
@@ -104,7 +104,7 @@ func (c *kafkaController) Stop() {
}
func (c *kafkaController) consumeUserCreatedEventTopic(ft kgo.FetchTopic) {
log.Info().Str("topic", ft.Topic).Msg("consumer: recieved records from topic")
log.Info().Str("topic", ft.Topic).Msg("consumer: received records from topic")
// Process each message from the topic
ft.EachRecord(func(record *kgo.Record) {
@@ -122,7 +122,7 @@ func (c *kafkaController) consumeUserCreatedEventTopic(ft kgo.FetchTopic) {
}
func (c *kafkaController) consumeShipmentAllocationEventTopic(ft kgo.FetchTopic) {
log.Info().Str("topic", ft.Topic).Msg("consumer: recieved records from topic")
log.Info().Str("topic", ft.Topic).Msg("consumer: received records from topic")
// Process each message from the topic
ft.EachRecord(func(record *kgo.Record) {
+2 -2
View File
@@ -313,7 +313,7 @@ func (c postgresController) PaymentForOrder(ctx context.Context, orderId string,
evtTopic string
)
if transaction != nil {
// Succesful
// Successful
evt, evtTopic, err = payment.PreparePaymentProcessedEvent_Success(transaction)
} else {
// Failure
@@ -321,7 +321,7 @@ func (c postgresController) PaymentForOrder(ctx context.Context, orderId string,
evt, evtTopic, err = payment.PreparePaymentProcessedEvent_Failure(orderId, customerId, amount)
}
// Ensure the event was prepared succesfully
// Ensure the event was prepared successfully
if err != nil {
return errors.WrapServiceError(errors.ErrCodeService, "failed to create event", err)
}