Tag: golang
-
How to Use covdata for Better Go Code Coverage
When you run your Go programs or integration tests, numbers of raw coverage files are typically generated and dumped into a directory specified by the GOCOVERDIR environment variable. These files contain valuable data about which parts of your code were executed during tests, offering a glimpse into your code’s effectiveness and robustness. However, sifting through…
-
Why I Switched to Table Driven Testing approach in Go
Unit Testing, specifically table driven tests, have gained significant popularity in recent years due to their ability to eliminate repetition and enhance test clarity and maintainability. By organizing test cases into a structured format, table driven tests provide a systematic way to reuse the same values across different unit testing scenarios efficiently. What is Table…
-
Capture gRPC Traffic going out from a Server
How does gRPC work? A quick Google search would tell you that it uses HTTP/2.0 under the hood, but that’s about it. Most available guides talk about gRPC internals by assuming that you are already deeply familiar with HTTP/2.0, and the only proper documentation for HTTP/2 is the official RFC document, which doesn’t contain implementation…