
gofmt no longer supports `tabs` and `tabwidth`, but we still require exactly-4-space tabs to preserve the narrow layout on gobyexample.com, so re-implement this functionality with sed.
11 lines
155 B
Bash
Executable File
11 lines
155 B
Bash
Executable File
#!/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
|