fix: template
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
```shell
|
```shell
|
||||||
go install git.gogacoder.ru/NTO/crudgen/cmd/crudgen@v1.0.15
|
go install git.gogacoder.ru/NTO/crudgen/cmd/crudgen@v1.0.16
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const GetByIdRawTemplate = `func (service *{{.ServiceName}}) GetById(id uint) (*
|
|||||||
const UpdateRawTemplate = `func (service *{{.ServiceName}}) Update(item {{.EntityType}}) ({{.EntityType}}, error) {
|
const UpdateRawTemplate = `func (service *{{.ServiceName}}) Update(item {{.EntityType}}) ({{.EntityType}}, error) {
|
||||||
utils.ReplaceEmptySlicesWithNil(&item)
|
utils.ReplaceEmptySlicesWithNil(&item)
|
||||||
|
|
||||||
_, err := dal.Author.Updates(&item)
|
_, err := dal.{{.EntityType}}.Updates(&item)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return item, err
|
return item, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user