This project has moved to dryan.github.io/d3ploy.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var elasticsearch = require('elasticsearch'); | |
var client = new elasticsearch.Client(); | |
var eventPattern = /([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) \"(.*?)\" \"(.*?)\" \"(.*?)\" \"(.*?)\" \"(.*?)\"/; | |
exports.handler = function(data, context) { | |
var events = []; | |
var encodedEvent, rawEvent, | |
matchedEvent, event, i, | |
commands; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if git rev-parse HEAD >/dev/null 2>&1; then | |
FILES=$(git diff --staged --name-only | grep -e '\.go$') | |
else | |
FILES=$(git ls-files -c | grep -e '\.go$') | |
fi | |
for file in $FILES; do | |
if test -n "$(gofmt -l $file)"; then | |
echo "Error: git pre-commit failed, file needs gofmt: $file" |