Skip to content

Commit

Permalink
refactor: rename pathIsIgnored to isPathIgnored
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjarosch committed Feb 8, 2024
1 parent e2fadf1 commit 9d18bda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions template.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (t *Templater) DiscoverPartials() {
t.partialTemplates = []*File{}

for _, tplFile := range t.Files {
if t.pathIsIgnored(tplFile.Path) {
if t.isPathIgnored(tplFile.Path) {
continue
}

Expand Down Expand Up @@ -199,7 +199,7 @@ func (t *Templater) execute(tplFile *File, data any, targetPath string, allowNoV

// Add every discovered partial template in case its needed.
for _, partialTemplate := range t.partialTemplates {
if t.pathIsIgnored(partialTemplate.Path) {
if t.isPathIgnored(partialTemplate.Path) {
continue
}

Expand Down Expand Up @@ -298,9 +298,9 @@ func (t *Templater) getTemplateByPath(path string) *File {
return nil
}

// pathIsIgnored provides a quick way to check whether a given path should be
// isPathIgnored provides a quick way to check whether a given path should be
// ignored based on the 'IgnoreRegex' field.
func (t *Templater) pathIsIgnored(filePath string) bool {
func (t *Templater) isPathIgnored(filePath string) bool {
for _, v := range t.IgnoreRegex {
if v.MatchString(filePath) {
return true
Expand Down

0 comments on commit 9d18bda

Please sign in to comment.