A collection of tools and libraries for working with #golang code, including linters and static analysis

A collection of tools and libraries for working with Go code, including linters and static analysis:

https://github.com/dominikh/go-tools

ToolDescription
gosimpleDetects code that could be rewritten in a simpler way.
keyifyTransforms an unkeyed struct literal into a keyed one.
rdepsFind all reverse dependencies of a set of packages
staticcheckDetects a myriad of bugs and inefficiencies in your code.
structlayoutDisplays the layout (field sizes and padding) of structs.
structlayout-optimizeReorders struct fields to minimize the amount of padding.
structlayout-prettyFormats the output of structlayout with ASCII art.
unusedReports unused identifiers (types, functions, …) in your code.
megacheckRun staticcheck, gosimple and unused in one go

Libraries

In addition to the aforementioned tools, this repository contains the libraries necessary to implement these tools.