diff --git a/addlicense/main.go b/addlicense/main.go index 0522dcd..68c291c 100644 --- a/addlicense/main.go +++ b/addlicense/main.go @@ -32,7 +32,7 @@ import ( "text/template" "time" - doublestar "github.com/bmatcuk/doublestar/v4" + "github.com/bmatcuk/doublestar/v4" "golang.org/x/sync/errgroup" ) @@ -366,7 +366,7 @@ func licenseHeader(path string, tmpl *template.Template, data LicenseData) ([]by lic, err = executeTemplate(tmpl, data, "/**", " * ", " */") case ".cc", ".cpp", ".cs", ".go", ".hh", ".hpp", ".m", ".mm", ".proto", ".rs", ".swift", ".dart", ".groovy", ".v", ".sv", ".lr": lic, err = executeTemplate(tmpl, data, "", "// ", "") - case ".py", ".sh", ".bash", ".zsh", ".yaml", ".yml", ".dockerfile", "dockerfile", ".rb", "gemfile", ".ru", ".tcl", ".hcl", ".tf", ".tfvars", ".nomad", ".bzl", ".pl", ".pp", ".ps1", ".psd1", ".psm1": + case ".py", ".sh", ".bash", ".zsh", ".yaml", ".yml", ".dockerfile", "dockerfile", ".rb", "gemfile", ".ru", ".tcl", ".hcl", ".tf", ".tfvars", ".nomad", ".bzl", ".pl", ".pp", ".ps1", ".psd1", ".psm1", ".txtar": lic, err = executeTemplate(tmpl, data, "", "# ", "") case ".el", ".lisp": lic, err = executeTemplate(tmpl, data, "", ";; ", "") diff --git a/addlicense/main_test.go b/addlicense/main_test.go index 46b183c..89d406b 100644 --- a/addlicense/main_test.go +++ b/addlicense/main_test.go @@ -318,7 +318,7 @@ func TestLicenseHeader(t *testing.T) { "// HYS\n\n", }, { - []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"}, + []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"}, "# HYS\n\n", }, {