mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
* Removing gofmt vendor ignores We don't have a vendor directory anymore 😄 🎉 * wrapping env var in quotes Thanks @chriscoffee for the suggestion!
9 lines
219 B
Bash
Executable File
9 lines
219 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# check_gofmt.sh
|
|
# Fail if a .go file hasn't been formatted with gofmt
|
|
set -euo pipefail
|
|
|
|
GO_FILES=$(find . -iname '*.go' -type f) # All the .go files
|
|
test -z $(gofmt -s -d "$GO_FILES" | tee /dev/stderr)
|