Skip to content

Commit

Permalink
perf(internal/logic/template): update template creation logic
Browse files Browse the repository at this point in the history
Update template variable for creating a template from a anonymous struct to a pointer to an
anonymous struct. This allows for the template variable to be passed by
reference rather than value.
  • Loading branch information
iton0 committed Dec 26, 2024
1 parent 7a00949 commit 0f460cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/logic/template/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ var (
// TemplateEditFlg is an optional flag indicating to edit the template.
TemplateEditFlg bool

// template holds the information to create the new template.
// template is a pointer that holds the information to create a new template.
// Info includes:
// - git hook name (hook)
// - language (lang)
// - custom template name (name)
// - if to use git hook in the current working directory (useCwd)
// - if to copy created template in the current working directory (copyHook)
// - if to edit the created template by opening editor (edit)
template = struct {
template = &struct {
hook, lang, name string
useCwd, copyHook, edit bool
}{}
Expand Down

0 comments on commit 0f460cb

Please sign in to comment.