https://github.com/tmc/srcutils
tools to modify go programs
https://github.com/tmc/srcutils
Last synced: 10 months ago
JSON representation
tools to modify go programs
- Host: GitHub
- URL: https://github.com/tmc/srcutils
- Owner: tmc
- License: isc
- Created: 2014-12-06T00:48:23.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-11-05T19:57:48.000Z (over 10 years ago)
- Last Synced: 2024-05-09T20:22:23.589Z (about 2 years ago)
- Language: Go
- Homepage:
- Size: 195 KB
- Stars: 11
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
srcutils
========
utilities to perform modifications on golang codebases
* license: isc
Installation
------------
```sh
$ go get github.com/tmc/srcutils/cmd/add_argument
```
Utilities
---------
add_argument
Adds a new argument to a codebase.
Example:
```sh
$ add_argument -w -arg="ctx context.Context" -pos=$GOPATH/src/github.com/tmc/srcutils/test/original/z.go:#26 github.com/tmc/srcutils/test/original
```
Produces the diff:
https://github.com/tmc/srcutils/commit/e70de1db99149dcf51940d1abbba0beba9779506