Gofix
Gofix uses Gos ability to parse source code into a tree to fix API-usage automatically.
ToC : Writing your own fixes
Writing your own fixes
Unfortunately, at the moment, after you implemented your own fix you will have to compile gofix with it for gofix to do the patching. Also, the gofix source including fixes is in just one folder; this will probably (hopefully) change in the future for separation of gofix and fixes. Maybe there will even be better mechanisms for feeding gofix new patches; without compiling again!?
Reference-files/fixes (increasing complexity):
- net.Dial – fix some function calls
- os.Open fix – Rename flag, fix os.Open calls (arguments)
- http package fix
- reflect package fix