From c62f8cf4406a56930f84215945bd1588d191fbd0 Mon Sep 17 00:00:00 2001 From: Mukesh Kumar Chaudhary Date: Sun, 7 Jan 2024 13:01:55 +0545 Subject: [PATCH] fix: rename hidden. files before generating --- pkg/utility/file.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/utility/file.go b/pkg/utility/file.go index c9d230a..83a7bca 100644 --- a/pkg/utility/file.go +++ b/pkg/utility/file.go @@ -93,15 +93,12 @@ func GenerateFiles(templatesFS embed.FS, templatePath string, targetRoot string, if filepath.Ext(path) == ".tmpl" { dst = strings.Replace(dst, ".tmpl", ".go", 1) } - generateFromEmbeddedTemplate(templatesFS, path, dst, data) if strings.HasPrefix(fileName, "hidden.") { dst = strings.Replace(dst, "hidden.", ".", 1) // just copy the files to the target directory - if err := copyFile(path, dst, templatesFS); err != nil { - panic(err) - } } + generateFromEmbeddedTemplate(templatesFS, path, dst, data) return nil })