Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/corylanou/go-colorize-stack
- Owner: corylanou
- Created: 2015-02-22T21:37:43.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-22T22:59:35.000Z (almost 10 years ago)
- Last Synced: 2023-11-30T04:23:26.422Z (about 1 year ago)
- Language: Go
- Size: 801 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.