gofmt tool
This commit is contained in:
parent
f9e9441615
commit
36bf9178f0
10
README.md
10
README.md
@ -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
3
tool/gofmt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ls */*.go | xargs -n 1 gofmt -tabs=false -tabwidth=4 -w=true
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
exec go run tool/renumber.go
|
exec go run tool/renumber.go
|
||||||
|
Loading…
x
Reference in New Issue
Block a user