
Deadmono tool finally unmasks unused go functions in monorepos, letting devs delete code without the usual cross-service paranoia meltdown
A new tool called deadmono has been developed to detect dead code in Go monorepos, addressing a long-standing issue in the Go community. Maintaining large Go monorepos with multiple services can lead to accumulated unused code, making it challenging to identify and remove dead functions. Existing linters and tools, such as deadcode, have limitations, particularly when dealing with multiple services that import different packages. Deadmono solves this problem by tracking package imports, analyzing each entrypoint separately, and intersecting results per package. This approach enables the identification of truly dead functions, allowing developers to confidently delete unused code. Developed by Arxeiss, deadmono is an open-source tool that can be installed using Go install, and its creator welcomes contributions. By providing a solution to this common problem, deadmono has the potential to improve code maintenance and reduce technical debt in the Go ecosystem, benefiting developers and companies that maintain large Go monorepos.