Skip to content

Commit

Permalink
fix: rename hidden. files before generating
Browse files Browse the repository at this point in the history
  • Loading branch information
mukezhz committed Jan 7, 2024
1 parent 6f78dab commit c62f8cf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/utility/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down

0 comments on commit c62f8cf

Please sign in to comment.