Finding Structurally Duplicate Go Functions with AST Hashing

go dev.to

Copy-paste is one of those engineering problems that starts harmless. You copy one handler. You rename User to Order. You change a few string literals. You adjust one validation branch. Everything works. Then six months later, the same bug is fixed in one copy but not the other. That is the kind of duplication godedup is built to find. godedup is a small Go CLI tool that finds structurally duplicate functions in Go code. It does not compare raw text. It does not care if variable names change

Read Full Tutorial open_in_new
arrow_back Back to Tutorials