Skip to content

coverage-report/golang-cover-json

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golang-cover-json

Parse golang-cover report files, and return a JSON representation in a lcov-parse compatible manner.

Installation

$ npm i @cvrg-report/golang-cover-json --save

Usage

var gocov = require("@cvrg-report/golang-cover-json");

// Parse by file path
gocov.parseFile("filepath.xml")
    .then(function (result) {
        console.log(JSON.stringify(result));
    }).catch(function (err) {
        console.error(err);
    });

// Parse by file contents
gocov.parseContent("mode: count ...")
    .then(function (result) {
        console.log(JSON.stringify(result));
    }).catch(function (err) {
        console.error(err);
    });

Thanks

This repo was initially forked from vokal/golang-cover-parse. Thanks a lot!

About

Parse golang cover result files and return a JSON structure like lcov-parse

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%