summaryrefslogtreecommitdiffstats
path: root/src/go/collectors/go.d.plugin/hack/go-fmt.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/go/collectors/go.d.plugin/hack/go-fmt.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/hack/go-fmt.sh b/src/go/collectors/go.d.plugin/hack/go-fmt.sh
new file mode 100755
index 000000000..fcc9e2d57
--- /dev/null
+++ b/src/go/collectors/go.d.plugin/hack/go-fmt.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+for TARGET in "${@}"; do
+ find "${TARGET}" -name '*.go' -exec gofmt -s -w {} \+
+done
+git diff --exit-code