update boilerplate logic
parent
1aa1f04e9b
commit
831346faed
|
|
@ -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}`)
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue