refactor file|path (#1409)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
This commit is contained in:
@@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user