refactor file|path (#1409)

Co-authored-by: anqiansong <anqiansong@bytedance.com>
This commit is contained in:
anqiansong
2022-01-03 21:32:40 +08:00
committed by GitHub
parent 290de6aa96
commit 89ce5e492b
81 changed files with 279 additions and 245 deletions

View File

@@ -1,7 +1,7 @@
package docker
import (
"github.com/tal-tech/go-zero/tools/goctl/util"
"github.com/tal-tech/go-zero/tools/goctl/util/pathx"
"github.com/urfave/cli"
)
@@ -43,7 +43,7 @@ CMD ["./{{.ExeFile}}"{{.Argument}}]
// Clean deletes all templates files
func Clean() error {
return util.Clean(category)
return pathx.Clean(category)
}
// GenTemplates creates docker template files
@@ -58,7 +58,7 @@ func Category() string {
// RevertTemplate recovers the deleted template files
func RevertTemplate(name string) error {
return util.CreateTemplate(category, name, dockerTemplate)
return pathx.CreateTemplate(category, name, dockerTemplate)
}
// Update deletes and creates new template files
@@ -72,7 +72,7 @@ func Update() error {
}
func initTemplate() error {
return util.InitTemplates(category, map[string]string{
return pathx.InitTemplates(category, map[string]string{
dockerTemplateFile: dockerTemplate,
})
}