Skip to content

Commit

Permalink
New Model Bug Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
aliforever committed Nov 12, 2019
1 parent 58de059 commit fc2dc8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func main() {
fmt.Println(err)
return
}
fmt.Println(fmt.Sprintf("Model %s file added in %s", model, path+modelPath))
fmt.Println(fmt.Sprintf("Model %s file added in %s", model, modelPath))
return
}
}
2 changes: 1 addition & 1 deletion templates/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (t Template) CreateModel(projectPath, modelName string, modelIdType, parent
}
}

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

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

0 comments on commit fc2dc8b

Please sign in to comment.