Documentation
¶
Index ¶
Constants ¶
View Source
const ( ImportGroupC = iota ImportGroupStd ImportGroup3rdParty ImportGroupCurrent ImportGroupRelative )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ImportsGrouper ¶
ImportsGrouper a facility to give an import path a certain weight what will be used to group a set of imports by it, i.e. import paths with the same weight will be in one groups of imports
func DefaultImportGroupsWithCurrent ¶
func DefaultImportGroupsWithCurrent(current string) ImportsGrouper
DefaultImportGroupsWithCurrent the same s DefaultImportsGroups just no current package set
func DefaultImportsGrouper ¶
func DefaultImportsGrouper() (ImportsGrouper, error)
DefaultImportsGrouper provides an import grouper with a policy that is supposed to be the default:
"C" - 0 Standard library - 1 3rd party - 2 Current project - 3 Relative imports - 4
It tried to determine a current project once called and may return an error if it failed to detect it. Use DefaultImportGroupsWithCurrent if you don't need it or need to set up your own
Source Files
¶
Click to show internal directories.
Click to hide internal directories.