We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4449be7 commit 042972fCopy full SHA for 042972f
build/boilerplate/boilerplate.py
@@ -139,8 +139,8 @@ def get_regexs():
139
regexs["year"] = re.compile( 'YEAR' )
140
# dates can be something in the 21st century
141
regexs["date"] = re.compile( '20[0-9][0-9]' )
142
- # strip // +build \n\n build constraints
143
- regexs["go_build_constraints"] = re.compile(r"^(// \+build.*\n)+\n", re.MULTILINE)
+ # strip // +build \n\n build and //go:build constraints
+ regexs["go_build_constraints"] = re.compile(r"^(//\s*(\+build|go:build).*\n)+\n", re.MULTILINE)
144
# strip #!.* from shell scripts
145
regexs["shebang"] = re.compile(r"^(#!.*\n)\n*", re.MULTILINE)
146
return regexs
0 commit comments