Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/corylanou/go-colorize-stack

Piping in to this program test output as will colorize the lines of code that belong to your project.
https://github.com/corylanou/go-colorize-stack

Last synced: 21 days ago
JSON representation

Piping in to this program test output as will colorize the lines of code that belong to your project.

Awesome Lists containing this project

README

        

# Colorize your go output

When dealing with stack traces (expecially panics) it takes forever to find the lines that are YOUR code.

I wrote this as a really basic colorizer that I can pipe output from test suites, etc. into.

## Install

```sh
go install github.com/corylanou/go-colorize-stack
```

## Usage

```sh
go test ./... | go-colorize-stack
```

This will ignore lines that come from the standard go library, but not all of them. I find passing in my package name
for a specific match works better.

```sh
go test ./... | go-colorize-stack -packageName=
```

For example, if I'm working on a project called influxdb, I run this command:

```sh
go test ./... | go-colorize-stack -packageName=influxdb
```

Now only the lines from my package are inverted in the output

Here is a screenshot:

![Image of Screenshot](https://github.com/corylanou/go-colorize-stack/blob/master/screenshot.png)

## Mostly Experimental

This is currently a very experimental project, with no testing, and hardly any use yet. I plan on dog fooding this
until it becomes useful to me. Feel free to open issues or create pull requests with suggestions.