update boilerplate logic

pull/13891/head
Steven Powell 2022-03-30 17:00:30 -07:00
parent 1aa1f04e9b
commit 831346faed
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ var (
skippedPaths = regexp.MustCompile(`Godeps|third_party|_gopath|_output|\.git|cluster/env.sh|vendor|test/e2e/generated/bindata.go|site/themes/docsy|test/integration/testdata`) skippedPaths = regexp.MustCompile(`Godeps|third_party|_gopath|_output|\.git|cluster/env.sh|vendor|test/e2e/generated/bindata.go|site/themes/docsy|test/integration/testdata`)
windowdNewLine = regexp.MustCompile(`\r`) windowdNewLine = regexp.MustCompile(`\r`)
txtExtension = regexp.MustCompile(`\.txt`) txtExtension = regexp.MustCompile(`\.txt`)
goBuildTag = regexp.MustCompile(`(?m)^(//go:build.*\n// \+build.*\n)+\n`) goBuildTag = regexp.MustCompile(`(?m)^(//go:build.*\n)+\n`)
shebang = regexp.MustCompile(`(?m)^(#!.*\n)\n*`) shebang = regexp.MustCompile(`(?m)^(#!.*\n)\n*`)
copyright = regexp.MustCompile(`Copyright YEAR`) copyright = regexp.MustCompile(`Copyright YEAR`)
copyrightReal = regexp.MustCompile(`Copyright \d{4}`) copyrightReal = regexp.MustCompile(`Copyright \d{4}`)

View File

@ -44,7 +44,7 @@ function prepend() {
done done
} }
prepend "\.go" "go" "+build" prepend "\.go" "go" "go:build"
prepend "\.py" "py" prepend "\.py" "py"
prepend "\.sh" "sh" "#!" prepend "\.sh" "sh" "#!"
prepend Makefile Makefile prepend Makefile Makefile