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

View File

@@ -95,7 +95,7 @@ func (c *kafkaController) Start() {
case messaging.Payment_Processing_Topic:
c.consumePaymentProcessedEventTopic(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")
}
})
}
@@ -107,7 +107,7 @@ func (c *kafkaController) Stop() {
}
func (c *kafkaController) consumeProductPriceQuoteEventTopic(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) {
@@ -125,7 +125,7 @@ func (c *kafkaController) consumeProductPriceQuoteEventTopic(ft kgo.FetchTopic)
}
func (c *kafkaController) consumeStockReservationEventTopic(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) {
@@ -143,7 +143,7 @@ func (c *kafkaController) consumeStockReservationEventTopic(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) {
@@ -161,7 +161,7 @@ func (c *kafkaController) consumeShipmentAllocationEventTopic(ft kgo.FetchTopic)
}
func (c *kafkaController) consumePaymentProcessedEventTopic(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) {

View File

@@ -108,7 +108,7 @@ func (c postgresController) CreateOrder(ctx context.Context, orderObj *pb.Order)
// Create records for any order items
err = c.createOrderItems(ctx, tx, newOrder.Id, newOrder.Items)
if err != nil {
// The deffered rollback will be called (so the transaction will not be commited)
// The deffered rollback will be called (so the transaction will not be committed)
return nil, err
}