remove no need (#87)
* rebase upstream * rebase * trim no need line * trim no need line * trim no need line * update doc * remove update * remove no need * remove no need * add jwt doc Co-authored-by: kingxt <dream4kingxt@163.com>
This commit is contained in:
@@ -60,8 +60,6 @@ func DoGenProject(apiFile, dir string, force bool) error {
|
||||
logx.Must(genHandlers(dir, api))
|
||||
logx.Must(genRoutes(dir, api, force))
|
||||
logx.Must(genLogic(dir, api))
|
||||
// it does not work
|
||||
format(dir)
|
||||
createGoModFileIfNeed(dir)
|
||||
|
||||
if err := backupAndSweep(apiFile); err != nil {
|
||||
@@ -102,14 +100,6 @@ func backupAndSweep(apiFile string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func format(dir string) {
|
||||
cmd := exec.Command("go", "fmt", "./"+dir+"...")
|
||||
_, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
func sweep() error {
|
||||
keepTime := time.Now().AddDate(0, 0, -7)
|
||||
return filepath.Walk(tmpDir, func(fpath string, info os.FileInfo, err error) error {
|
||||
|
||||
Reference in New Issue
Block a user