Uploaded December 2024 | Updated December 2026, 3 days ago
Why should you use my custom code coverage tool? You shouldn’t; the one built into Go is great and you should just use that. However, writing our own from scratch is a great way to pull back the curtain on a widely used feature of the Go toolchain, and we can learn a lot from doing it. This talk will blitz through how Go’s -cover flag works, what Go does when you tell it to build a program, and how we can use -toolexec to edit builds and add our own basic instrumentation. This will be a quick introduction to some of the inner workings of the build tool we all know and love, and I hope to leave you with the desire and confidence to try to explore it on your own.
Why should you use my custom code coverage tool? You shouldn’t; the one built into Go is great and you should just use that. However, writing our own from scratch is a great way to pull back the curtain on a widely used feature of the Go toolchain, and we can learn a lot from doing it. This talk will blitz through how Go’s -cover flag works, what Go does when you tell it to build a program, and how we can use -toolexec to edit builds and add our own basic instrumentation. This will be a quick introduction to some of the inner workings of the build tool we all know and love, and I hope to leave you with the desire and confidence to try to explore it on your own.










