diff --git a/README.md b/README.md index 8b8d426..d022ed5 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,15 @@ Go by Example book source. ### Reordering -```bash +```console $ mate tool/index.txt $ tool/renumber ``` + + +### Gofmt'ing + +```console +$ tool/gofmt +``` + diff --git a/tool/gofmt b/tool/gofmt new file mode 100644 index 0000000..2c83ba2 --- /dev/null +++ b/tool/gofmt @@ -0,0 +1,3 @@ +#!/bin/bash + +ls */*.go | xargs -n 1 gofmt -tabs=false -tabwidth=4 -w=true diff --git a/tool/renumber b/tool/renumber index ced5840..2f5e599 100755 --- a/tool/renumber +++ b/tool/renumber @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/bash exec go run tool/renumber.go