16 lines
211 B
Bash
Executable File
16 lines
211 B
Bash
Executable File
#!/bin/bash
|
|
|
|
srcdir="${PWD}/examples"
|
|
|
|
if ! command -v gofmt &> /dev/null;
|
|
then
|
|
exit 0
|
|
fi
|
|
|
|
for f in $(find ${srcdir} -type f -iname "*.go");
|
|
do
|
|
gofmt -w "${f}"
|
|
git add "${f}"
|
|
done
|
|
echo "Reformatted examples"
|