rowanjacobs / stderr-reader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stderr-reader

Extraordinarily quick and dirty CLI for reading Ginkgo/Gomega outputs such as this:

[BeforeSuite] BeforeSuite
/Users/pivotal/go/src/github.com/pivotal-cf/p-windows-runtime/test/manifest/manifest_suite_test.go:26

  Expected error:
      <*exec.ExitError | 0xc0000a8f20>: {
          ProcessState: {
              pid: 19231,
              status: 256,
              rusage: {
                  Utime: {
                      Sec: 0,
                      Usec: 78580,
                      Pad_cgo_0: [0, 0, 0, 0],
                  },
                  Stime: {
                      Sec: 0,
                      Usec: 55478,
                      Pad_cgo_0: [0, 0, 0, 0],
                  },
                  Maxrss: 23552000,
                  Ixrss: 0,
                  Idrss: 0,
                  Isrss: 0,
                  Minflt: 16917,
                  Majflt: 0,
                  Nswap: 0,
                  Inblock: 0,
                  Oublock: 0,
                  Msgsnd: 4,
                  Msgrcv: 8,
                  Nsignals: 7,
                  Nvcsw: 368,
                  Nivcsw: 771,
              },
          },
          Stderr: [27, 91, 48, 59, 51, 52, 109, 68, 111, 99, 107, 101, 114, 32, 100, 101, 116, 101, 99, 116, 101, 100, 44, 32, 114, 117, 110, 110, 105, 110, 103, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 115, 32, 105, 110, 115, 105, 100, 101, 32, 100, 111, 99, 107, 101, 114, 46, 46, 46, 27, 91, 48, 109, 10, 85, 115, 105, 110, 103, 32, 100, 101, 102, 97, 117, 108, 116, 32, 116, 97, 103, 58, 32, 108, 97, 116, 101, 115, 116, 10, 108, 97, 116, 101, 115, 116, 58, 32, 80, 117, 108, 108, 105, 110, 103, 32, 102, 114, 111, 109, 32, 112, 105, 118, 111, 116, 97, 108, 99, 102, 114, 101, 108, 101, 110, 103, 47, 103, 111, 108, 97, 110, 103, 10, 68, 105, 103, 101, 115, 116, 58, 32, 115, 104, 97, 50, 53, 54, 58, 51, 102, 101, 53, 51, 51, 53, 102, 48, 48, 54, 49, 100, 98, 100, 51, 51, 98, 49, 98, 100, 100, 97, 54, 57, 50, 102, 53, 51, 56, 51, 52, 51, 52, 52, 101, 57, 51, 50, 55, 50, 97, 50, 99, 99, 57, 101, 49, 51, 56, 98, 101, 52, 100, 51, 102, 54, 55, 52, 50, 56, 51, 100, 48, 10, 83, 116, 97, 116, 117, 115, 58, 32, 73, 109, 97, 103, 101, 32, 105, 115, 32, 117, 112, 32, 116, 111, 32, 100, 97, 116, 101, 32, 102, 111, 114, 32, 112, 105, 118, 111, 116, 97, 108, 99, 102, 114, 101, 108, 101, 110, 103, 47, 103, 111, 108, 97, 110, 103, 58, 108, 97, 116, 101, 115, 116, 10, 116, 104, 101, 32, 105, 110, 112, 117, 116, 32, 100, 101, 118, 105, 99, 101, 32, 105, 115, 32, 110, 111, 116, 32, 97, 32, 84, 84, 89, 10],
      }
      exit status 1
  not to have occurred

and turning them into this:

Docker detected, running containers inside docker...
Using default tag: latest
latest: Pulling from pivotalcfreleng/golang
Digest: sha256:3fe5335f0061dbd33b1bdda692f53834344e93272a2cc9e138be4d3f674283d0
Status: Image is up to date for pivotalcfreleng/golang:latest
the input device is not a TTY

Usage:

go run main.go "[27, 91, 48, 59, 51, 52, 109, 68, 111, 99, 107, 101, 114, 32, 100, 101, 116, 101, 99, 116, 101, 100, 44, 32, 114, 117, 110, 110, 105, 110, 103, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 115, 32, 105, 110, 115, 105, 100, 101, 32, 100, 111, 99, 107, 101, 114, 46, 46, 46, 27, 91, 48, 109, 10, 85, 115, 105, 110, 103, 32, 100, 101, 102, 97, 117, 108, 116, 32, 116, 97, 103, 58, 32, 108, 97, 116, 101, 115, 116, 10, 108, 97, 116, 101, 115, 116, 58, 32, 80, 117, 108, 108, 105, 110, 103, 32, 102, 114, 111, 109, 32, 112, 105, 118, 111, 116, 97, 108, 99, 102, 114, 101, 108, 101, 110, 103, 47, 103, 111, 108, 97, 110, 103, 10, 68, 105, 103, 101, 115, 116, 58, 32, 115, 104, 97, 50, 53, 54, 58, 51, 102, 101, 53, 51, 51, 53, 102, 48, 48, 54, 49, 100, 98, 100, 51, 51, 98, 49, 98, 100, 100, 97, 54, 57, 50, 102, 53, 51, 56, 51, 52, 51, 52, 52, 101, 57, 51, 50, 55, 50, 97, 50, 99, 99, 57, 101, 49, 51, 56, 98, 101, 52, 100, 51, 102, 54, 55, 52, 50, 56, 51, 100, 48, 10, 83, 116, 97, 116, 117, 115, 58, 32, 73, 109, 97, 103, 101, 32, 105, 115, 32, 117, 112, 32, 116, 111, 32, 100, 97, 116, 101, 32, 102, 111, 114, 32, 112, 105, 118, 111, 116, 97, 108, 99, 102, 114, 101, 108, 101, 110, 103, 47, 103, 111, 108, 97, 110, 103, 58, 108, 97, 116, 101, 115, 116, 10, 116, 104, 101, 32, 105, 110, 112, 117, 116, 32, 100, 101, 118, 105, 99, 101, 32, 105, 115, 32, 110, 111, 116, 32, 97, 32, 84, 84, 89, 10]"

or

go run main.go [27, 91, 48, 59, 51, 52, 109, 68, 111, 99, 107, 101, 114, 32, 100, 101, 116, 101, 99, 116, 101, 100, 44, 32, 114, 117, 110, 110, 105, 110, 103, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 115, 32, 105, 110, 115, 105, 100, 101, 32, 100, 111, 99, 107, 101, 114, 46, 46, 46, 27, 91, 48, 109, 10, 85, 115, 105, 110, 103, 32, 100, 101, 102, 97, 117, 108, 116, 32, 116, 97, 103, 58, 32, 108, 97, 116, 101, 115, 116, 10, 108, 97, 116, 101, 115, 116, 58, 32, 80, 117, 108, 108, 105, 110, 103, 32, 102, 114, 111, 109, 32, 112, 105, 118, 111, 116, 97, 108, 99, 102, 114, 101, 108, 101, 110, 103, 47, 103, 111, 108, 97, 110, 103, 10, 68, 105, 103, 101, 115, 116, 58, 32, 115, 104, 97, 50, 53, 54, 58, 51, 102, 101, 53, 51, 51, 53, 102, 48, 48, 54, 49, 100, 98, 100, 51, 51, 98, 49, 98, 100, 100, 97, 54, 57, 50, 102, 53, 51, 56, 51, 52, 51, 52, 52, 101, 57, 51, 50, 55, 50, 97, 50, 99, 99, 57, 101, 49, 51, 56, 98, 101, 52, 100, 51, 102, 54, 55, 52, 50, 56, 51, 100, 48, 10, 83, 116, 97, 116, 117, 115, 58, 32, 73, 109, 97, 103, 101, 32, 105, 115, 32, 117, 112, 32, 116, 111, 32, 100, 97, 116, 101, 32, 102, 111, 114, 32, 112, 105, 118, 111, 116, 97, 108, 99, 102, 114, 101, 108, 101, 110, 103, 47, 103, 111, 108, 97, 110, 103, 58, 108, 97, 116, 101, 115, 116, 10, 116, 104, 101, 32, 105, 110, 112, 117, 116, 32, 100, 101, 118, 105, 99, 101, 32, 105, 115, 32, 110, 111, 116, 32, 97, 32, 84, 84, 89, 10]

No tests, no CI, no warranty, no very little error handling.

About

License:Apache License 2.0


Languages

Language:Go 100.0%