gofmt tool

This commit is contained in:
Mark McGranaghan 2012-09-23 18:29:48 -07:00
parent f9e9441615
commit 36bf9178f0
3 changed files with 13 additions and 2 deletions

View File

@ -5,7 +5,15 @@ Go by Example book source.
### Reordering ### Reordering
```bash ```console
$ mate tool/index.txt $ mate tool/index.txt
$ tool/renumber $ tool/renumber
``` ```
### Gofmt'ing
```console
$ tool/gofmt
```

3
tool/gofmt Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
ls */*.go | xargs -n 1 gofmt -tabs=false -tabwidth=4 -w=true

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/bash
exec go run tool/renumber.go exec go run tool/renumber.go