#!/bin/bash set -eo pipefail paths=$(ls tools/*.go examples/*/*.go) for path in $paths; do gofmt -w=true $path sed -i '' -e 's/ / /g' $path done