Skip to content

Instantly share code, notes, and snippets.

@confluentgist
Last active December 28, 2019 01:34
Show Gist options
  • Select an option

  • Save confluentgist/e535b6a777b5a7e2a8962cca25cb3610 to your computer and use it in GitHub Desktop.

Select an option

Save confluentgist/e535b6a777b5a7e2a8962cca25cb3610 to your computer and use it in GitHub Desktop.
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