github.com/msoap/go-carpet@v1.10.1-0.20240316220419-b690da179708/go-carpet.1 (about)

     1  .\" generated with Ronn/v0.7.3
     2  .\" http://github.com/rtomayko/ronn/tree/0.7.3
     3  .
     4  .TH "GO\-CARPET" "" "January 2022" "" ""
     5  .
     6  .SH "NAME"
     7  \fBgo\-carpet\fR \- show test coverage for Go source files
     8  .
     9  .P
    10  To view the test coverage in the terminal, just run \fBgo\-carpet\fR\.
    11  .
    12  .P
    13  It works outside of the \fBGOPATH\fR directory\. And it works recursively for multiple packages\.
    14  .
    15  .P
    16  With \fB\-256colors\fR option, shades of green indicate the level of coverage\.
    17  .
    18  .P
    19  By default skip vendor directories (Godeps,vendor), otherwise use \fB\-include\-vendor\fR option\.
    20  .
    21  .SH "Usage"
    22  .
    23  .nf
    24  
    25  usage: go\-carpet [options] [paths]
    26    \-256colors
    27          use more colors on 256\-color terminal (indicate the level of coverage)
    28    \-args string
    29          pass additional arguments for go test
    30    \-file string
    31          comma\-separated list of files to test (default: all)
    32    \-func string
    33          comma\-separated functions list (default: all functions)
    34    \-include\-vendor
    35          include vendor directories for show coverage (Godeps, vendor)
    36    \-summary
    37          only show summary for each file
    38    \-version
    39          get version
    40  .
    41  .fi
    42  .
    43  .P
    44  For view coverage in less, use \fB\-R\fR option:
    45  .
    46  .IP "" 4
    47  .
    48  .nf
    49  
    50  go\-carpet | less \-R
    51  .
    52  .fi
    53  .
    54  .IP "" 0
    55  .
    56  .SH "Install"
    57  From source:
    58  .
    59  .IP "" 4
    60  .
    61  .nf
    62  
    63  go install github\.com/msoap/go\-carpet@latest
    64  .
    65  .fi
    66  .
    67  .IP "" 0
    68  .
    69  .P
    70  Download binaries from: releases \fIhttps://github\.com/msoap/go\-carpet/releases\fR (OS X/Linux/Windows)
    71  .
    72  .P
    73  Install from homebrew (OS X):
    74  .
    75  .IP "" 4
    76  .
    77  .nf
    78  
    79  brew tap msoap/tools
    80  brew install go\-carpet
    81  # update:
    82  brew upgrade go\-carpet
    83  .
    84  .fi
    85  .
    86  .IP "" 0
    87  .
    88  .P
    89  .
    90  .SH "See also"
    91  .
    92  .IP "\(bu" 4
    93  blog\.golang\.org \fIhttps://blog\.golang\.org/cover\fR \- the cover story
    94  .
    95  .IP "\(bu" 4
    96  gocover\.io \fIhttps://gocover\.io\fR \- simple Go test coverage service
    97  .
    98  .IP "\(bu" 4
    99  coveralls\.io \fIhttps://coveralls\.io\fR \- test coverage service
   100  .
   101  .IP "\(bu" 4
   102  package cover \fIhttps://godoc\.org/golang\.org/x/tools/cover\fR \- golang\.org/x/tools/cover
   103  .
   104  .IP "\(bu" 4
   105  gotests \fIhttps://github\.com/cweill/gotests\fR \- Go commandline tool that generates table driven tests
   106  .
   107  .IP "\(bu" 4
   108  docker\-golang\-checks \fIhttps://github\.com/msoap/docker\-golang\-checks\fR \- Go\-code checks Docker image
   109  .
   110  .IP "" 0
   111