Skip to content

Commit 0f460cb

Browse files
author
iton0
committed
perf(internal/logic/template): update template creation logic
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.
1 parent 7a00949 commit 0f460cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/logic/template/create.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ var (
2828
// TemplateEditFlg is an optional flag indicating to edit the template.
2929
TemplateEditFlg bool
3030

31-
// template holds the information to create the new template.
31+
// template is a pointer that holds the information to create a new template.
3232
// Info includes:
3333
// - git hook name (hook)
3434
// - language (lang)
3535
// - custom template name (name)
3636
// - if to use git hook in the current working directory (useCwd)
3737
// - if to copy created template in the current working directory (copyHook)
3838
// - if to edit the created template by opening editor (edit)
39-
template = struct {
39+
template = &struct {
4040
hook, lang, name string
4141
useCwd, copyHook, edit bool
4242
}{}

0 commit comments

Comments
 (0)