Skip to content

Commit fc2dc8b

Browse files
committed
New Model Bug Fixed
1 parent 58de059 commit fc2dc8b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func main() {
8787
fmt.Println(err)
8888
return
8989
}
90-
fmt.Println(fmt.Sprintf("Model %s file added in %s", model, path+modelPath))
90+
fmt.Println(fmt.Sprintf("Model %s file added in %s", model, modelPath))
9191
return
9292
}
9393
}

templates/template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (t Template) CreateModel(projectPath, modelName string, modelIdType, parent
104104
}
105105
}
106106

107-
path = fmt.Sprintf(ModelsPath, path) + "/" + strings.ToLower(fileName) + ".go"
107+
path = fmt.Sprintf(ModelsPath, projectPath) + "/" + strings.ToLower(fileName) + ".go"
108108

109109
tableName := strings.ToLower(flect.Underscore(flect.Pluralize(fileName)))
110110
fileString, err = TemplateData{}.FillModel(fileString, fileName, fileName, modelSign, "", modelKey, tableName, parentMethodStr, parentField, fields)

0 commit comments

Comments
 (0)