Merge pull request #63 from maksimov/master

Fix lint.sh on macOS (#62)
diff --git a/AUTHORS b/AUTHORS
index 872dba8..f30c5ca 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -22,3 +22,4 @@
 Shawn Smith <shawnpsmith@gmail.com>
 Tor Arvid Lund <torarvid@gmail.com>
 Zac Bergquist <zbergquist99@gmail.com>
+Stas Maksimov <maksimov@gmail.com>
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 7efa0b6..29f5607 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -29,3 +29,4 @@
 Shawn Smith <shawnpsmith@gmail.com>
 Tor Arvid Lund <torarvid@gmail.com>
 Zac Bergquist <zbergquist99@gmail.com>
+Stas Maksimov <maksimov@gmail.com>
\ No newline at end of file
diff --git a/scripts/lint.sh b/scripts/lint.sh
index 24a3d62..080195f 100755
--- a/scripts/lint.sh
+++ b/scripts/lint.sh
@@ -5,18 +5,18 @@
 
 echo "gofmt:"
 OUT=$(gofmt -l $ROOT_DIR)
-if [ $(echo -n "$OUT" | wc -l) -ne 0 ]; then echo "$OUT"; PROBLEM=1; fi
+if [ $(echo "$OUT\c" | wc -l) -ne 0 ]; then echo "$OUT"; PROBLEM=1; fi
 
 echo "errcheck:"
 OUT=$(errcheck $PKG/...)
-if [ $(echo -n "$OUT" | wc -l) -ne 0 ]; then echo "$OUT"; PROBLEM=1; fi
+if [ $(echo "$OUT\c" | wc -l) -ne 0 ]; then echo "$OUT"; PROBLEM=1; fi
 
 echo "go vet:"
 OUT=$(go tool vet -all=true -v=true $ROOT_DIR 2>&1 | grep --invert-match -P "(Checking file|\%p of wrong type|can't check non-constant format)")
-if [ $(echo -n "$OUT" | wc -l) -ne 0 ]; then echo "$OUT"; PROBLEM=1; fi
+if [ $(echo "$OUT\c" | wc -l) -ne 0 ]; then echo "$OUT"; PROBLEM=1; fi
 
 echo "golint:"
 OUT=$(golint $PKG/... | grep --invert-match -P "(method DiffPrettyHtml should be DiffPrettyHTML)")
-if [ $(echo -n "$OUT" | wc -l) -ne 0 ]; then echo "$OUT"; PROBLEM=1; fi
+if [ $(echo "$OUT\c" | wc -l) -ne 0 ]; then echo "$OUT"; PROBLEM=1; fi
 
 if [ -n "$PROBLEM" ]; then exit 1; fi