Recipe 84 | Debugging Running Services |
Task
You are in charge of a messaging system. The data engineering team opens an issue for you:
For some reason, we see several empty messages in the database. We think it comes from your code and not our process. Can you please check.
You think it’s probably not from your code, since you do validate input messages before you continue. But you know the data engineering team are very professional, so you can’t discard their claim.
Looking at the code, you don’t see anything suspicious:
| // Message is a channel message. |
| type Message struct { |
| From string `json:"from"` |
| Channel string `json:"channel"` |
| Body string `json:"body"` |
| |
| ID string `json:"-"` |
| } |
| |
| |
Get Effective Go Recipes now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.