feat: ignore empty import
parent
57e4bbd4d7
commit
7bb5fc7d63
|
@ -219,10 +219,16 @@ func (ft *Formatter) formatImports(
|
|||
continue
|
||||
}
|
||||
|
||||
// Ignore second import decl and more
|
||||
if isExistFirstImportDecl {
|
||||
continue
|
||||
}
|
||||
|
||||
// Ignore empty import
|
||||
if len(genDecl.Specs) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
// First import decl take all
|
||||
isExistFirstImportDecl = true
|
||||
genDecl.Specs = formattedImportSpecs
|
||||
|
|
Loading…
Reference in New Issue