Skip to content

Commit f66d1e2

Browse files
authored
Add support for .txtar files (#104)
1 parent 2cf2e4a commit f66d1e2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

addlicense/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
"text/template"
3333
"time"
3434

35-
doublestar "github.com/bmatcuk/doublestar/v4"
35+
"github.com/bmatcuk/doublestar/v4"
3636
"golang.org/x/sync/errgroup"
3737
)
3838

@@ -366,7 +366,7 @@ func licenseHeader(path string, tmpl *template.Template, data LicenseData) ([]by
366366
lic, err = executeTemplate(tmpl, data, "/**", " * ", " */")
367367
case ".cc", ".cpp", ".cs", ".go", ".hh", ".hpp", ".m", ".mm", ".proto", ".rs", ".swift", ".dart", ".groovy", ".v", ".sv", ".lr":
368368
lic, err = executeTemplate(tmpl, data, "", "// ", "")
369-
case ".py", ".sh", ".bash", ".zsh", ".yaml", ".yml", ".dockerfile", "dockerfile", ".rb", "gemfile", ".ru", ".tcl", ".hcl", ".tf", ".tfvars", ".nomad", ".bzl", ".pl", ".pp", ".ps1", ".psd1", ".psm1":
369+
case ".py", ".sh", ".bash", ".zsh", ".yaml", ".yml", ".dockerfile", "dockerfile", ".rb", "gemfile", ".ru", ".tcl", ".hcl", ".tf", ".tfvars", ".nomad", ".bzl", ".pl", ".pp", ".ps1", ".psd1", ".psm1", ".txtar":
370370
lic, err = executeTemplate(tmpl, data, "", "# ", "")
371371
case ".el", ".lisp":
372372
lic, err = executeTemplate(tmpl, data, "", ";; ", "")

addlicense/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func TestLicenseHeader(t *testing.T) {
318318
"// HYS\n\n",
319319
},
320320
{
321-
[]string{"f.py", "f.sh", ".bash", ".zsh", "f.yaml", "f.yml", "f.dockerfile", "dockerfile", "f.rb", "gemfile", ".ru", "f.tcl", "f.bzl", "f.pl", "f.pp", "f.ps1", "f.psd1", "f.psm1", "f.hcl", "f.tf", "f.nomad", "f.tfvars"},
321+
[]string{"f.py", "f.sh", ".bash", ".zsh", "f.yaml", "f.yml", "f.dockerfile", "dockerfile", "f.rb", "gemfile", ".ru", "f.tcl", "f.bzl", "f.pl", "f.pp", "f.ps1", "f.psd1", "f.psm1", "f.hcl", "f.tf", "f.nomad", "f.tfvars", "f.txtar"},
322322
"# HYS\n\n",
323323
},
324324
{

0 commit comments

Comments
 (0)