goimports has its own optimized directory scanning code. Reportedly, gorename is quite a bit slower. They should probably share code. /cc @alandonovan