Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple way to instrument a Go binary for code coverage
// +build testrunmain
package main
import (
"testing"
"github.com/confluentinc/bincover"
)
func TestRunMain(t *testing.T) {
bincover.RunTest(main)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment