Gofix

Gofix uses Gos ability to parse source code into a tree to fix API-usage automatically.

ToC : Writing your own fixes

Official Blog post on gofix.

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):