refactor gogen
remove dirty code in gogen.go