OSDN Git Service

update get-transaction
[bytom/shuttle.git] / vendor / github.com / gin-gonic / gin / coverage.sh
diff --git a/vendor/github.com/gin-gonic/gin/coverage.sh b/vendor/github.com/gin-gonic/gin/coverage.sh
new file mode 100644 (file)
index 0000000..4d1ee03
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+set -e
+
+echo "mode: count" > coverage.out
+
+for d in $(go list ./... | grep -E 'gin$|binding$|render$' | grep -v 'examples'); do
+    go test -v -covermode=count -coverprofile=profile.out $d
+    if [ -f profile.out ]; then
+        cat profile.out | grep -v "mode:" >> coverage.out
+        rm profile.out
+    fi
+done