Abstract syntax tree Tool Parse Golang source code into a ast Modify this ast Output new Golang source code from this modified ast Other tools https://astexplorer.net/