logp

command
v0.0.0-...-fe72480 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2018 License: MIT Imports: 5 Imported by: 0

README

logp -- Log Parser

Problem is given a log file like this:

<timestamp> Non event
<timestamp> Begin Recording
<timestamp> event a
<timestamp> event b
<timestamp> event c
<timestamp> event d
<timestamp> End Recording
<timestamp> Non event
<timestamp> Non event
<timestamp> Non event
<timestamp> Non event
<timestamp> Begin Recording
<timestamp> event e
<timestamp> event f
<timestamp> End Recording

Capture all the 'event x' lines only

Solutions are in Go:

  • logp.go - Solution in go. Run with: go run logp.go
  • logpalt.go - Alternative solution in go using for (like while). Run with: go run logpalt.go

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

  • logp.go
  • logpalt.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL