Skip to content

Instantly share code, notes, and snippets.

@aj0strow
Last active November 11, 2015 19:36
Show Gist options
  • Save aj0strow/b71888d73a4444f56396 to your computer and use it in GitHub Desktop.
Save aj0strow/b71888d73a4444f56396 to your computer and use it in GitHub Desktop.
// node lock-catcher.js myprogram.go
var reader = require('line-reader')
var file = process.argv[2]
var prev = null
reader.eachLine(file, function (line) {
if (prev && /Lock/.test(prev) && !/defer/.test(line)) {
console.error('You probably messed up.')
}
prev = line
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment