Skip to content

Instantly share code, notes, and snippets.

@nickpresta
Created January 18, 2014 01:23
Show Gist options
  • Select an option

  • Save nickpresta/8484834 to your computer and use it in GitHub Desktop.

Select an option

Save nickpresta/8484834 to your computer and use it in GitHub Desktop.
Using gofmt to rewrite 19 files to use a new method signature.
$ gofmt -w -r 'service.client.Do(a, b, c) -> service.client.Do(a, b)' *.go
$ git diff
- resp, err := service.client.Do(req, accounts, false)
+ resp, err := service.client.Do(req, accounts)
- resp, err := service.client.Do(req, business, false)
+ resp, err := service.client.Do(req, business)
# continues on for dozens more lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment