#!/bin/bash changed="$(gofmt -d .)" [ -n "$changed" ] && { echo 'Some files are not formatted' delta <<< "$changed" exit 1 } go vet ./...