refactor: pkgName -> moduleName

main
sudo pacman -Syu 2022-11-26 12:42:05 +07:00
parent f6471ab9d6
commit a030fec81f
No known key found for this signature in database
GPG Key ID: D6CB5C6C567C47B0
1 changed files with 2 additions and 3 deletions

View File

@ -144,12 +144,11 @@ func (ft *Formatter) formatFile(path string) error {
} }
ft.log("importsAST: %+v\n", importsAST) ft.log("importsAST: %+v\n", importsAST)
// TODO: Find dir go.mod package name moduleName, err := ft.moduleName(path)
pkgName, err := ft.moduleName(path)
if err != nil { if err != nil {
return err return err
} }
ft.log("pkgName: %+v\n", pkgName) ft.log("moduleName: %+v\n", moduleName)
groupImports, err := ft.groupImports(importsAST) groupImports, err := ft.groupImports(importsAST)
if err != nil { if err != nil {