Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Goc CoverageNew to Visual Studio Code? Get it now.
Goc Coverage

Goc Coverage

Li Yiyang

|
1,089 installs
| (0) | Free
Goc Coverage can display coverage vairation in real time. Goc is a comprehensive coverage testing system for The Go Programming Language, especially for some complex scenarios, like system testing code coverage collection and accurate testing.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Goc Coverage

This extension provides rich support for the goc tool.

Overview

  • Getting started
  • Ask for help

Getting started

Welcome! The goc is a coverage tool for Golang projects. The most interesting part of goc is that it can generate coverage report while the service is running! You can test the service manually or automatically, whatever, you don't have to stop the tested service to get the coverage report anymore.

This extension provides a frontend to show the covered lines in real time.

demo

Basic requirements

Before you started, make sure that you have:

  1. Go
  2. goc
  3. source code of the tested service

Set up your environment

Follow the goc example guide to build and start the tested service. After you finished this step, there should be a goc server running at default port 7777.

Use vscode to open the source code. Make sure the vscode's workspace is in the Golang project's root directory. If your project uses go module, just open vscode in the repo's directory. If your project uses GOPATH, you should setup right GOPATH before you open vscode.

Open any Go source files, you should see a Goc Coverage OFF button in the bottom status bar, click on the button to enable rendering covered lines in real time.

Configuration

goc server url

If you deploy the goc server on another host with a customized port, you can set:

"goc.serverUrl": "http://192.168.1.3:51234"

Ask for help

If you're having issues with this extension, please reach out to us by filing an issue directly.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft