diff --git a/cmd/imports-formatter/main.go b/cmd/imports-formatter/main.go index 906011e..b36b679 100644 --- a/cmd/imports-formatter/main.go +++ b/cmd/imports-formatter/main.go @@ -20,12 +20,14 @@ package main import ( "bufio" "flag" + "fmt" "io" "io/ioutil" "os" "sort" "strings" + "github.com/dubbogo/tools/constant" "github.com/pkg/errors" ) @@ -61,6 +63,7 @@ func init() { } func main() { + fmt.Println("imports-formatter:", constant.Version) flag.Parse() var err error projectName, err = getProjectName(projectRootPath) diff --git a/cmd/imports-formatter/test-files/test-imports.go b/cmd/imports-formatter/test-files/test-imports.go index d1f3cc1..1207348 100644 --- a/cmd/imports-formatter/test-files/test-imports.go +++ b/cmd/imports-formatter/test-files/test-imports.go @@ -7,4 +7,5 @@ import ( _ "io/ioutil" _ "os" ) + // 测试中间注释 diff --git a/constant/version.go b/constant/version.go new file mode 100644 index 0000000..c38534c --- /dev/null +++ b/constant/version.go @@ -0,0 +1,5 @@ +package constant + +const ( + Version = "1.0.6" +)