refactor(code): Cleaned-up the code base
This commit is contained in:
19
check.sh
Executable file
19
check.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if [ -n "${GO_BIN:-}" ]; then
|
||||
go_bin="$GO_BIN"
|
||||
elif command -v go >/dev/null 2>&1; then
|
||||
go_bin="$(command -v go)"
|
||||
elif [ -x /home/linuxbrew/.linuxbrew/bin/go ]; then
|
||||
go_bin=/home/linuxbrew/.linuxbrew/bin/go
|
||||
else
|
||||
echo "go not found. Set GO_BIN=/path/to/go or install Go." >&2
|
||||
exit 127
|
||||
fi
|
||||
|
||||
"$go_bin" fmt ./...
|
||||
"$go_bin" vet ./...
|
||||
"$go_bin" test ./... "$@"
|
||||
Reference in New Issue
Block a user