From 56ffba1883f8bda12aaf9dc6ffec057c0967cb86 Mon Sep 17 00:00:00 2001 From: gogacoder Date: Sat, 15 Mar 2025 20:47:17 +0700 Subject: [PATCH] fix: template --- README.md | 2 +- internal/raw_templates.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7702fbf..d73ddab 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## Install ```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 diff --git a/internal/raw_templates.go b/internal/raw_templates.go index 451799b..3a26694 100644 --- a/internal/raw_templates.go +++ b/internal/raw_templates.go @@ -31,7 +31,7 @@ const GetByIdRawTemplate = `func (service *{{.ServiceName}}) GetById(id uint) (* const UpdateRawTemplate = `func (service *{{.ServiceName}}) Update(item {{.EntityType}}) ({{.EntityType}}, error) { utils.ReplaceEmptySlicesWithNil(&item) - _, err := dal.Author.Updates(&item) + _, err := dal.{{.EntityType}}.Updates(&item) if err != nil { return item, err }