Documentation
¶
Overview ¶
Package dce implements dead code elimination for generated Go source files. It removes top-level declarations from the runtime section that are not reachable from non-runtime code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EliminateDeadCode ¶
EliminateDeadCode parses a generated Go source file, identifies runtime declarations (between the oapi-runtime markers), and removes any that are not reachable from non-runtime code.
The output is re-printed via go/printer, so callers should run goimports afterward to normalize formatting.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.