Compare commits
1 Commits
50edeb07ca
...
v1.0.14
| Author | SHA1 | Date | |
|---|---|---|---|
| b26de27165 |
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
```shell
|
```shell
|
||||||
go install git.gogacoder.ru/NTO/crudgen/cmd/crudgen@v1.0.13
|
go install git.gogacoder.ru/NTO/crudgen/cmd/crudgen@v1.0.14
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package internal
|
|||||||
|
|
||||||
const CreateRawTemplate = `func (service *{{.ServiceName}}) Create(item {{.EntityType}}) ({{.EntityType}}, error) {
|
const CreateRawTemplate = `func (service *{{.ServiceName}}) Create(item {{.EntityType}}) ({{.EntityType}}, error) {
|
||||||
utils.ReplaceEmptySlicesWithNil(&item)
|
utils.ReplaceEmptySlicesWithNil(&item)
|
||||||
err := dal.Author.Create(&item)
|
err := dal.{{.EntityType}}.Create(&item)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return item, err
|
return item, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user