From a030fec81f645915fe5177ef71c62a4720a3b71d Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Sat, 26 Nov 2022 12:42:05 +0700 Subject: [PATCH] refactor: pkgName -> moduleName --- internal/imports/formatter.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/imports/formatter.go b/internal/imports/formatter.go index f059f44..bb2922f 100644 --- a/internal/imports/formatter.go +++ b/internal/imports/formatter.go @@ -144,12 +144,11 @@ func (ft *Formatter) formatFile(path string) error { } ft.log("importsAST: %+v\n", importsAST) - // TODO: Find dir go.mod package name - pkgName, err := ft.moduleName(path) + moduleName, err := ft.moduleName(path) if err != nil { return err } - ft.log("pkgName: %+v\n", pkgName) + ft.log("moduleName: %+v\n", moduleName) groupImports, err := ft.groupImports(importsAST) if err != nil {