chore: reformat a little bit
parent
b17a39b0dd
commit
a9f7cab6f0
|
@ -239,10 +239,7 @@ func (ft *Formatter) formatImports(
|
||||||
}
|
}
|
||||||
ft.logDSTImportSpecs("formatImports: dstImportSpecs", dstFile.Imports)
|
ft.logDSTImportSpecs("formatImports: dstImportSpecs", dstFile.Imports)
|
||||||
|
|
||||||
groupedDSTImportSpecs, err := ft.groupDSTImportSpecs(
|
groupedDSTImportSpecs, err := ft.groupDSTImportSpecs(dstFile.Imports, moduleName)
|
||||||
dstFile.Imports,
|
|
||||||
moduleName,
|
|
||||||
)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -263,10 +260,7 @@ func (ft *Formatter) formatImports(
|
||||||
return buf.Bytes(), nil
|
return buf.Bytes(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ft *Formatter) groupDSTImportSpecs(
|
func (ft *Formatter) groupDSTImportSpecs(importSpecs []*dst.ImportSpec, moduleName string) (map[string][]*dst.ImportSpec, error) {
|
||||||
importSpecs []*dst.ImportSpec,
|
|
||||||
moduleName string,
|
|
||||||
) (map[string][]*dst.ImportSpec, error) {
|
|
||||||
result := make(map[string][]*dst.ImportSpec)
|
result := make(map[string][]*dst.ImportSpec)
|
||||||
result[stdImport] = make([]*dst.ImportSpec, 0, 8)
|
result[stdImport] = make([]*dst.ImportSpec, 0, 8)
|
||||||
result[thirdPartyImport] = make([]*dst.ImportSpec, 0, 8)
|
result[thirdPartyImport] = make([]*dst.ImportSpec, 0, 8)
|
||||||
|
|
Loading…
Reference in New Issue