Enrich `go test` outputs with text decorations.

richgo

Rich-Go will enrich go test outputs with text decorations

PkgGoDev Go Report Card Coverage Status Release

asciicast

Installation

(go get):

go get -u github.com/kyoh86/richgo

(homebrew):

brew tap kyoh86/tap
brew install richgo

(asdf):

asdf plugin add richgo
asdf install richgo 0.3.6

Usage

Basic

richgo test ./...

In an existing pipeline

If your build scripts expect to interact with the standard output format of go test (for instance, if you're using go-junit-report), you'll need to use the testfilter subcommand of richgo.

For example:

go test ./... | tee >(richgo testfilter) | go-junit-report

This will "tee" the output of the standard go test run into a richgo testfilter process as well as passing the original output to go-junit-report.

Note that at some point this recommendation may change, as the "go test" tool may learn how to produce a standard output format golang/go#2981 that both this tool and others could rely on.

alias

You can define alias so that go test prints rich outputs:

  • bash: ~/.bashrc
  • zsh: ~/.zshrc
alias go=richgo

Configure

Configuration file paths

It's possible to change styles with the preference file. Rich-Go loads preferences from the files in the following order.

  • ${CWD}/.richstyle
  • ${CWD}/.richstyle.yaml
  • ${CWD}/.richstyle.yml
  • ${GOPATH}/.richstyle
  • ${GOPATH}/.richstyle.yaml
  • ${GOPATH}/.richstyle.yml
  • ${GOROOT}/.richstyle
  • ${GOROOT}/.richstyle.yaml
  • ${GOROOT}/.richstyle.yml
  • ${HOME}/.richstyle
  • ${HOME}/.richstyle.yaml
  • ${HOME}/.richstyle.yml

Setting the environment variable RICHGO_LOCAL to 1, Rich-Go loads only ${CWD}/.richstyle*.

Configuration file format

Now Rich-Go supports only YAML formatted.

# Type of the label that notes a kind of each lines.
labelType: (long | short | none)

# Style of "Build" lines.
buildStyle:
  # Hide lines
  hide: (true | false)
  # Bold or increased intensity.
  bold: (true | false)
  faint: (true | false)
  italic: (true | false)
  underline: (true | false)
  blinkSlow: (true | false)
  blinkRapid: (true | false)
  # Swap the foreground color and background color.
  inverse: (true | false)
  conceal: (true | false)
  crossOut: (true | false)
  frame: (true | false)
  encircle: (true | false)
  overline: (true | false)
  # Fore-color of text
  foreground: (#xxxxxx | rgb(0-256,0-256,0-256) | rgb(0x00-0xFF,0x00-0xFF,0x00-0xFF) | (name of colors))
  # Back-color of text
  background: # Same format as `foreground`

# Style of the "Start" lines.
startStyle:
  # Same format as `buildStyle`

# Style of the "Pass" lines.
passStyle:
  # Same format as `buildStyle`

# Style of the "Fail" lines.
failStyle:
  # Same format as `buildStyle`

# Style of the "Skip" lines.
skipStyle:
  # Same format as `buildStyle`

# Style of the "File" lines.
fileStyle:
  # Same format as `buildStyle`

# Style of the "Line" lines.
lineStyle:
  # Same format as `buildStyle`

# Style of the "Pass" package lines.
passPackageStyle:
  # Same format as `buildStyle`

# Style of the "Fail" package lines.
failPackageStyle:
  # Same format as `buildStyle`

# A threashold of the coverage
coverThreshold: (0-100)

# Style of the "Cover" lines with the coverage that is higher than coverThreshold.
coveredStyle:
  # Same format as `buildStyle`

# Style of the "Cover" lines with the coverage that is lower than coverThreshold.
uncoveredStyle:
  # Same format as `buildStyle`

# If you want to delete lines, write the regular expressions.
removals:
  - (regexp)
# If you want to leave `Test` prefixes, set it "true".
leaveTestPrefix: (true | false)

Line categories

Rich-Go separate the output-lines in following categories.

  • Build:
    When the Go fails to build, it prints errors like this:

    # github.com/kyoh86/richgo/sample/buildfail
    sample/buildfail/buildfail_test.go:6: t.Foo undefined (type testing.T has no field or method Foo)
  • Start:
    In the top of test, Go prints that name like this:

    === RUN   TestSampleOK/SubtestOK
  • Pass:
    When a test is successed, Go prints that name like this:

        ---PASS: TestSampleOK/SubtestOK
  • Fail:
    When a test is failed, Go prints that name like this:

    --- FAIL: TestSampleNG (0.00s)
    sample_ng_test.go:9: It's not OK... :(
  • Skip:
    If there is no test files in directory or a test is skipped, Go prints that path or the name like this:

    --- SKIP: TestSampleSkip (0.00s)
    sample_skip_test.go:6:
    

? github.com/kyoh86/richgo/sample/notest [no test files]

  • PassPackage:
    When tests in package are successed, Go prints just:

    PASS
  • Fail:
    When a test in package are failed, Go prints just:

    FAIL
  • Cover:
    If the coverage analysis is enabled, Go prints the coverage like this:

    === RUN   TestCover05
    

--- PASS: TestCover05 (0.00s) PASS coverage: 50.0% of statements ok github.com/kyoh86/richgo/sample/cover05 0.012s coverage: 50.0% of statements

Each categories can be styled seperately.

Label types

  • Long:

    • Build: "BUILD"
    • Start: "START"
    • Pass: "PASS"
    • Fail: "FAIL"
    • Skip: "SKIP"
    • Cover: "COVER"
  • Short:

    • Build: "!!"
    • Start: ">"
    • Pass: "o"
    • Fail: "x"
    • Skip: "-"
    • Cover: "%"
  • None: Rich-Go will never output labels.

Default

labelType: long
buildStyle:
  bold: true
  foreground: yellow
startStyle:
  foreground: lightBlack
passStyle:
  foreground: green
failStyle:
  bold: true
  foreground: red
skipStyle:
  foreground: lightBlack
passPackageStyle:
  foreground: green
  hide: true
failPackageStyle:
  bold: true
  foreground: red
  hide: true
coverThreshold: 50
coveredStyle:
  foreground: green
uncoveredStyle:
  bold: true
  foreground: yellow
fileStyle:
  foreground: cyan
lineStyle:
  foreground: magenta

Overriding colorization detection

By default, richgo determines whether or not to colorize its output based on whether it's connected to a TTY or not. This works for most use cases, but may not behave as expected if you use richgo in a pipeline of commands, where STDOUT is being piped to another command.

To force colorization, add RICHGO_FORCE_COLOR=1 to the environment you're running in. For example:

RICHGO_FORCE_COLOR=1 richgo test ./... | tee test.log

Configure to resolve a conflict with "Solarized dark" theme

The bright-black is used for background color in Solarized dark theme. Richgo uses that color for "startStyle" and "skipStyle", so "START" and "SKIP" lines can not be seen on the screen with Solarized dark theme.

To resolve that conflict, you can set another color for "startStyle" and "skipStyle" in .richstyle like below.

startStyle:
  foreground: yellow

skipStyle:
  foreground: lightYellow

License

MIT License

This is distributed under the MIT License.

Owner
Kyoichiro Yamada
Working in @wacul. Lovin' Go, C#, Perl and Shell
Kyoichiro Yamada
Comments
  • Colour output not as expected

    Colour output not as expected

    Hi 👋

    I was playing around with RichGo and am unsure whether this is a bug or not 🤔

    When running a test suite, there seems to be just one single color for all the output in one category. Like in this case everything that belongs to the FAIL category is just plain red:

    The screenshot in your readme suggests that files, line numbers, etc should have a different color. For instance, I would have expected the line indicators to be printed in magenta and the actual files in cyan.

    Am I doing something wrong?

    Thank you!

    P.S.: I am running richgo on Mac + zsh.

  • Test output whitespace mangled

    Test output whitespace mangled

    Some of our tests output wide columnar diffs when something doesn't match:

    --- FAIL: TestBuilder (0.01s)
        --- FAIL: TestBuilder/object/nested/deeper (0.01s)
            Error Trace:    diffing.go:48
        			builder_test.go:87
        			builder_test.go:31
        	Error:  	Strings are different (left is expected, right is actual):
        			(logicalplan.Evaluate) {					(logicalplan.Evaluate) {
        			  Expression: (expressions.ObjectTransform) {			  Expression: (expressions.ObjectTransform) {
        			    LHS: (expressions.Placeholder) {				    LHS: (expressions.Placeholder) {
        			      Name: (string) (len=3) "lhs"				      Name: (string) (len=3) "lhs"
        			    },								    },
    [...]
    

    Here's with richgo test:

    FAIL | Builder (0.02s)
    FAIL |       Builder/object/nested/deeper (0.01s)
      Error Trace:  diffing.go:487: 
          builder_test.go:87
          builder_test.go:31
      Error:    Strings are different (left is expected, right is actual):
         |           (logicalplan.Evaluate) {          (logicalplan.Evaluate) {
         |             Expression: (expressions.ObjectTransform) {        Expression: (expressions.ObjectTransform) {
         |               LHS: (expressions.Placeholder) {            LHS: (expressions.Placeholder) {
         |                 Name: (string) (len=3) "lhs"              Name: (string) (len=3) "lhs"
         |               },                    },
    

    This is of course completely unreadable.

    The lines are aligned with spaces, not tabs, so I don't know why it's compressing them like this.

  • output is not parsed if cached

    output is not parsed if cached

    First run, as you can see the lines with cached are not parsed properly

    20-12-15 13:35 % richgo test -cover -race ./pkg/...  
    SKIP | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/auditlog        [no test files]
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cache  (cached)        coverage: 98.4% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cache/tenant   (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cache/user     (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd    (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/gen        (cached)        coverage: 100.0% of statements
    PASS | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/gen/config 0.257s
    COVER| 72.0% [#######___]
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/gen/i18n   (cached)        coverage: 100.0% of statements
    SKIP | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/migrate     [no test files]
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/register   (cached)        coverage: 98.8% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/root       (cached)        coverage: 100.0% of statements
    SKIP | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/start       [no test files]
    SKIP | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/constants       [no test files]
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/currency       (cached)        coverage: 100.0% of statements
    PASS | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/db/mongo 0.826s
    COVER| 25.7% [##________]
    SKIP | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/db/mongo/mocks  [no test files]
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/helpers        (cached)        coverage: 82.4% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/i18n   (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/keymutex       (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/log    (cached)        coverage: 96.2% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/middleware     (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/models/mcmp    (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/settings       (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/tasks  (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/token  (cached)        coverage: 100.0% of statements
    SKIP | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/token/mocks     [no test files]
    

    Second run, only the lines with SKIP are parsed

    20-12-15 13:36 % richgo test -cover -race ./pkg/... 
    SKIP | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/auditlog        [no test files]
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cache  (cached)        coverage: 98.4% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cache/tenant   (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cache/user     (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd    (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/gen        (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/gen/config (cached)        coverage: 72.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/gen/i18n   (cached)        coverage: 100.0% of statements
    SKIP | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/migrate     [no test files]
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/register   (cached)        coverage: 98.8% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/root       (cached)        coverage: 100.0% of statements
    SKIP | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/cmd/start       [no test files]
    SKIP | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/constants       [no test files]
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/currency       (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/db/mongo       (cached)        coverage: 25.7% of statements
    SKIP | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/db/mongo/mocks  [no test files]
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/helpers        (cached)        coverage: 82.4% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/i18n   (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/keymutex       (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/log    (cached)        coverage: 96.2% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/middleware     (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/models/mcmp    (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/settings       (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/tasks  (cached)        coverage: 100.0% of statements
         | ok       github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/token  (cached)        coverage: 100.0% of statements
    SKIP | github.ibm.com/cloudMatrix-CAM/common-lib-go/pkg/token/mocks     [no test files]
    

    MacOS 11.1 (Big Sur) Go version go1.15.5 darwin/amd64 richgo is the latest (installed today from brew): kyoh86/tap/richgo: stable 0.3.3

  • Color scheme conflict with gnome solarized dark

    Color scheme conflict with gnome solarized dark

    Hi, thanks for your great project.

    I found the default color config is conflicted with gnome solarized dark theme, many lines will not show when running test, though they are truly printed on screen(Seems like empty lines).

    Take this as example:

    START| Persist12C
         | Test (2C): basic persistence ...
         |   ... Passed
    PASS | Persist12C (5.77s)
    

    These lines can not be seen on the screen

    START| Persist12C
         | Test (2C): basic persistence ...
         |   ... Passed
    

    Only this line can be seen

    PASS | Persist12C (5.77s)
    

    And if I switched into solarized light, everything will be OK.

  • Add dual-output for compatibility with existing tools

    Add dual-output for compatibility with existing tools

    Many tools currently parse the output of go test, which means we can't just drop this helpful tool into a build pipeline without breaking things.

    Of note, there's a proposal in upstream Golang to support a standard "go test" output (https://github.com/golang/go/issues/2981) which would help this and many other tools. However this is just a "proposal" and there's no concrete timeline for implementing.

    In the meantime, the output of "go test" is the canonical source-of-truth for test runs, and many tools (including go-junit-report(https://github.com/jstemmer/go-junit-report) which I use and contribute to expect the tests runs to output their results in a specific, human-friendly format.

    In order to differentiate between output made for humans (which richgo does a great job at doing) and output for machines (which go test currently does, although it's currently both for-machine and for-human, and it isn't very great for humans), I'd like to augment richgo to support outputting both: a human-friendly mode, and a machine-friendly mode.

    In the short term, the machine-friendly mode will simply be the input we get from running "go test" unmunged. In the future, it will probably be go test -json or whatever the upstream proposal lands on, which will make everybody's job easier.

    The primary changes proposed are to implement two flags (and optionally environment variables):

    • the output path to send the human-friendly version to (default: os.Stdout)
    • the output path to send the machine-friendly version to (currently ioutil.Discard)

    note that rather than hard-coding paths for defaults, will need to do some portability things to make sure we don't hardcode this as /dev/stdout and instead use the more portable os.Stdout and ioutil.Discard istead of /dev/null -- none of this will be difficult but writing it down here so I don't forget it.

    Then somebody could run this tool using linux FIFOS (totally untested):

    tmpdir=$(mkdtemp -d)
    outfifo="${tmpdir}/MYFIFO
    mkfifo a=rw "${outfifo}"
    go-junit-report < ${outfifo} > junit.xml
    richgo test --machine-friendly-output "${outfifo}"
    

    And on their console they would have the default, nice, colorized output on os.Stdout, but go-junit-report would be parsing the "machine-friendly" version.

    References #3

  • Richgo hangs after the test finish with a failure

    Richgo hangs after the test finish with a failure

    In the https://github.com/kubermatic/kubecarrier project we're using richgo for parsing the test output:

    https://github.com/kubermatic/kubecarrier/blob/e2e-explorations/hack/.e2e-test.sh

    kubectl kubecarrier e2e-test run --test.v --test.failfast --test-id=${TEST_ID} | richgo testfilter
    

    Sometimes after the failing test, the richgo hangs. Here's the output from stdout/err:

    ...
         |     --- FAIL: Integration/apiserver (65.18s)
         |         --- PASS: Integration/apiserver/account-service (1.39s)
         |         --- PASS: Integration/apiserver/region-service (2.20s)
         |         --- PASS: Integration/apiserver/provider-service (2.58s)
         |         --- FAIL: Integration/apiserver/offering-service (60.02s)
         |         --- FAIL: Integration/apiserver/instance-service (137.03s)
    FAIL
    

    and after running ps axf I see only richgo is still running; thus my own testing binary producing output has closed.

    486497 pts/6    Ss     0:06              \_ /usr/bin/zsh -i
     558511 pts/6    S+     0:00              |   \_ make e2e-test
     569591 pts/6    S+     0:00              |       \_ /bin/bash ./hack/.e2e-test.sh
     569593 pts/6    Sl+    0:00              |           \_ richgo testfilter
     569602 pts/6    S+     0:00              |               \_ cat -
    

    After stracing it:

     ▲ ~/Desktop/kubecarrier sudo strace -fp 569593                                                                                                                                                                                                                                                                                                                           
    strace: Process 569593 attached with 5 threads
    [pid 569601] futex(0xc000074148, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
    [pid 569600] futex(0xc00004e848, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
    [pid 569599] epoll_pwait(5,  <unfinished ...>
    [pid 569598] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
    [pid 569593] waitid(P_PID, 569602, 
    

    Now I have two questions:

    • why does it hang?
    • Why it's executing cat - command

    Is there anything more I could do to debug this issue?

  • Testfilter does not work

    Testfilter does not work

    I would like to avoid using richgo as the primary entrypoint for my tests (I have my reasons) so I was happy to see that I can just pass an output to richgo. Unfortunately it doesn't do any colorization.

    I tried the following:

    $ go test -v ./pkg/... | tee >(richgo testfilter)
    $ go test -v ./pkg/... | richgo testfilter
    $ go test -v ./pkg/... | tee >(richgo testfilter) | cat
    

    What am doing wrong?

    (Note: normally I run a makefile to execute tests, which produces the exact same output as go test, so I doubt it's an issue)

    I use macOS with iTerm and zsh

  • Extraneous newlines are added for some commands

    Extraneous newlines are added for some commands

    I wouldn't expect the output of richgo version and go version to be different at all, but they are:

    richgo - master! ❯ ./richgo version
    go version go1.8.1 darwin/amd64
    
    
    richgo - master! ❯ go version
    go version go1.8.1 darwin/amd64
    richgo - master! ❯
    

    This appears to be us manually adding \n characters in Close() on *stream

    richgo - master! ❯ git --no-pager diff
    diff --git i/editor/editor.go w/editor/editor.go
    index e702e15..6074485 100644
    --- i/editor/editor.go
    +++ w/editor/editor.go
    @@ -2,6 +2,7 @@ package editor
    
     import (
            "bytes"
    +       "fmt"
            "io"
     )
    
    @@ -40,6 +41,7 @@ func (s *stream) writeLines(lines [][]byte) error {
     }
    
     func (s *stream) Write(b []byte) (int, error) {
    +       fmt.Println("Write")
            lines := bytes.Split(append(s.buffer, b...), []byte("\n"))
            s.buffer = lines[len(lines)-1]
            lines = lines[:len(lines)-1]
    @@ -50,6 +52,7 @@ func (s *stream) Write(b []byte) (int, error) {
     }
    
     func (s *stream) Close() error {
    +       fmt.Println("Close stream")
            lines := bytes.Split(s.buffer, []byte(`\n`))
            s.buffer = nil
            if err := s.writeLines(lines); err != nil {
    
    richgo - master! ❯ ./richgo version
    Write
    go version go1.8.1 darwin/amd64
    Close stream
    
    Close stream
    
    richgo - master! ❯
    

    The double-close seems weird. Not sure if this is already on your radar. Obviously there are a lot of potential solutions, wanted to hear your thoughts before opening a PR.

  • Also colorize `go vet ./...`

    Also colorize `go vet ./...`

    Vet can get pretty verbose with package-prefixed type names as well as file paths. Colors for file paths, package names and paths would be a great start :)

  • Is there a way to know richgo version ?

    Is there a way to know richgo version ?

    Hi,

    I'm using richgo for a while now, but I'm facing a small issue I would like to raise.

    I'm struggling to get the richgo version on the multiple machines I'm using.

    So when I doubt if richgo is up-to-date on the machine I am, I'm installing again from latest tag.

    Could you consider something to provide the richgo version ?

    I don't know why it's not available, may be because richgo is simple a "proxy" to go command, so adding flag may conflict with golang binary.

    I'm not talking about having information about richgo with richgo version but may be something richgo --richgo-version

  • Add one line summary to count tests passed/failed/skipped

    Add one line summary to count tests passed/failed/skipped

    Hello, thanks for your tool :) Very appreciable :)

    Do you think it would be possible to add a one line summary to count tests that passed/failed/skipped at the end? Coming from other languages, this is something I miss in go test.

    If you're interested, I could try to open a PR if you guide me a bit.

    Thanks :)

  • bug: benchtest output always colored pass style

    bug: benchtest output always colored pass style

    Running benchmark tests, the output is always colored according to the passStyle property, regardless of failure or pass or info.

    passStyle:
      foreground: "#FFC0CB"
    

    image

  • Richgo testfilter will not create build for failing tests

    Richgo testfilter will not create build for failing tests

    Hi,

    i'm trying to use richgo together with go-junit-report and use your recommendation but there is drawback i have found. With the command

    go test ./... | tee >(richgo testfilter) | go-junit-report
    

    your build will not fail (return status == 0). This is bit weird as with this step we don't have the option to stop build broken packages..

    So far i have the following workaround

    go test ./... | tee >(richgo testfilter) | go-junit-report; exit "$${PIPESTATUS[0]}"
    

    Maybe this can be added to the docs?

A minimalist Go PDF writer in 1982 lines. Draws text, images and shapes. Helps understand the PDF format. Used in production for reports.
A minimalist Go PDF writer in 1982 lines. Draws text, images and shapes. Helps understand the PDF format. Used in production for reports.

one-file-pdf - A minimalist PDF generator in <2K lines and 1 file The main idea behind this project was: "How small can I make a PDF generator for it

Dec 11, 2022
A modern and intuitive terminal-based text editor
A modern and intuitive terminal-based text editor

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals.

Jan 5, 2023
The new home of the CUE language! Validate and define text-based and dynamic configuration

The CUE Data Constraint Language Configure, Unify, Execute CUE is an open source data constraint language which aims to simplify tasks involving defin

Dec 31, 2022
Tool to easily rename or move a bunch of files with a text editor of your choice
Tool to easily rename or move a bunch of files with a text editor of your choice

batch-rename With batch-rename you can utilize your favorite text editor to rename or move a bunch of files at once. It doesn't come with any features

Nov 2, 2022
Phalanx is a cloud-native full-text search and indexing server written in Go built on top of Bluge that provides endpoints through gRPC and traditional RESTful API.

Phalanx Phalanx is a cloud-native full-text search and indexing server written in Go built on top of Bluge that provides endpoints through gRPC and tr

Dec 25, 2022
Insert German umlauts in the clipboard text.

Trying to write German on an English keyboard proves to be hard. Entering umlauts like ä and ß is not easy. This program will insert umlauts in your c

Feb 7, 2022
Knit is an inline code generation tool that combines the power of Go's text/template package with automatic spec file loading.

Knit Knit is an inline code generation tool that combines the power of Go's text/template package with automatic spec file loading. Example openapi: "

Sep 15, 2022
James is your butler and helps you to create, build, debug, test and run your Go projects
James is your butler and helps you to create, build, debug, test and run your Go projects

go-james James is your butler and helps you to create, build, debug, test and run your Go projects. When you often create new apps using Go, it quickl

Oct 8, 2022
Automatically generate Go test boilerplate from your source code.
Automatically generate Go test boilerplate from your source code.

gotests gotests makes writing Go tests easy. It's a Golang commandline tool that generates table driven tests based on its target source files' functi

Jan 3, 2023
Solution to elevator test problem but this time recursive and in go

Synopsis A multi-floor building has a Lift in it. People are queued on different floors waiting for the Lift. Some people want to go up. Some people w

Nov 8, 2021
Implementation of the test task, chat in the goland language
Implementation of the test task, chat in the goland language

Implementation of the test task, chat in the goland language

Dec 5, 2021
A Golang program for a colleague to help in calculating the ratio between the points obtained in a test and the corresponding evaluation in tenths.
A Golang program for a colleague to help in calculating the ratio between the points obtained in a test and the corresponding evaluation in tenths.

A Golang program for a colleague to help in calculating the ratio between the points obtained in a test and the corresponding evaluation in tenths. If you have not the compiled file (.exe) you can build it with the Go compiler.

Jul 7, 2022
MNC Technical Test With Golang

MNC Technical Test With Golang

Nov 20, 2021
A toy repo used to test the functionality of "go mod why".

Mod Why Test Discussion From a module perspective: The main module (github.com/ejweber/mod-why-test) has a single direct dependency (github.com/ejwebe

Dec 1, 2021
Extensions for the melatonin test framework

melatonin-ext - Extensions for the melatonin test framework These packages extend melatonin to provide additional test contexts for testing various 3r

Nov 27, 2021
A little tool to create small QR code cards for vaccination/test proof.

Icedream's fancy vaccination/test certificate card tool This is just a tool I wrote to transform my vaccine certificate QR codes into something I can

Dec 16, 2021
Test-project - Lyrid Golang 1.x Chi Template

Lyrid Golang 1.x Chi Template Run locally with: go get go run ./main.go Open ht

Jan 31, 2022
Go-opera-test - EVM-compatible chain secured by the Lachesis consensus algorithm

Opera EVM-compatible chain secured by the Lachesis consensus algorithm. Building

Feb 14, 2022
A project outputs Bluetooth Low Energy (BLE) sensors data in InfluxDB line protocol formatA project outputs Bluetooth Low Energy (BLE) sensors data in InfluxDB line protocol format

Intro This project outputs Bluetooth Low Energy (BLE) sensors data in InfluxDB line protocol format. It integrates nicely with the Telegraf execd inpu

Apr 15, 2022
Gomol is a library for structured, multiple-output logging for Go with extensible logging outputs

gomol Gomol (Go Multi-Output Logger) is an MIT-licensed structured logging library for Go. Gomol grew from a desire to have a structured logging libra

Sep 26, 2022