Giter Site home page Giter Site logo

anandpathak / gocov-html Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matm/gocov-html

0.0 0.0 0.0 282 KB

Produces HTML output from gocov, a coverage testing tool for the Go programming language

License: MIT License

Go 96.31% Makefile 3.69%

gocov-html's Introduction

Gocov HTML export

This is a simple helper tool for generating HTML output from axw/gocov

Here is a screenshot:

HTML coverage report screenshot

Installation

Just type the following to install the program and its dependencies:

$ go install github.com/axw/gocov/gocov@latest
$ go install github.com/matm/gocov-html/cmd/gocov-html@latest

Features Matrix

Feature Version
Use custom CSS file 1.0
Show program version 1.1.1
Write CSS of default theme to stdout 1.2
Embbed custom CSS into final HTML document 1.2

Usage

$ gocov-html -h
Usage of ./gocov-html:
  -d    output CSS of default theme
  -s string
        path to custom CSS file
  -v    show program version

gocov-html can read a JSON file or read from standard input:

$ gocov test strings | gocov-html > strings.html
ok      strings 0.700s  coverage: 98.1% of statements

The generated HTML content comes along with a default embedded CSS. However a custom stylesheet can be used with the -s flag:

$ gocov test net/http | gocov-html -s mystyle.css > http.html

As of version 1.2:

  • A -d flag is available to write the defaut stylesheet to the standard output. This is provided for convenience and easy editing:
    $ gocov-html -d > newstyle.css
    ... edit newstyle.css ...
    $ gocov test strings | gocov-html -s newstyle.css > http.html
    
  • The content of the stylesheet given to -s is embedded into the final HTML document

gocov-html's People

Contributors

matm avatar mschoch avatar anandpathak-gp avatar anandpathak avatar popbones avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.