Documentation ¶
Overview ¶
Package generate contains helper functions for code generators.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OrganizeImports ¶
OrganizeImports takes a buffer containing Go code and a file path where that code will live, resolves the imports and formats the code, and writes the resulting formatted code into the buffer.
Returns nil if the code was processed and the buffer is now updated with the organized, formatted code, or an error if something went wrong during the import+format process.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.