diff --git a/hack/boilerplate/boilerplate.py b/hack/boilerplate/boilerplate.py index 07373f705..b5ae2d7cb 100755 --- a/hack/boilerplate/boilerplate.py +++ b/hack/boilerplate/boilerplate.py @@ -179,8 +179,8 @@ def get_regexs(): # dates can be 2014, 2015, 2016, ..., CURRENT_YEAR, company holder names can be anything years = range(2014, date.today().year + 1) regexs["date"] = re.compile( '(%s)' % "|".join(map(lambda l: str(l), years)) ) - # strip // +build \n\n build constraints - 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"^(//(go:build| \+build).*\n)+\n", re.MULTILINE) # strip #!.* from shell scripts regexs["shebang"] = re.compile(r"^(#!.*\n)\n*", re.MULTILINE) return regexs @@ -199,4 +199,4 @@ def main(): return 0 if __name__ == "__main__": - sys.exit(main()) \ No newline at end of file + sys.exit(main()) diff --git a/pkg/mounter/safe_mounter_unix.go b/pkg/mounter/safe_mounter_unix.go index e59c9cf75..d5ee4d14a 100644 --- a/pkg/mounter/safe_mounter_unix.go +++ b/pkg/mounter/safe_mounter_unix.go @@ -1,3 +1,4 @@ +//go:build linux || darwin // +build linux darwin /* diff --git a/pkg/mounter/safe_mounter_v1beta_windows.go b/pkg/mounter/safe_mounter_v1beta_windows.go index fd1046ef5..56abce690 100644 --- a/pkg/mounter/safe_mounter_v1beta_windows.go +++ b/pkg/mounter/safe_mounter_v1beta_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows /* diff --git a/pkg/mounter/safe_mounter_windows.go b/pkg/mounter/safe_mounter_windows.go index 19e109382..87f08ae26 100644 --- a/pkg/mounter/safe_mounter_windows.go +++ b/pkg/mounter/safe_mounter_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows /* diff --git a/pkg/smb/smb_common_darwin.go b/pkg/smb/smb_common_darwin.go index 895fa1134..b3b4fa979 100644 --- a/pkg/smb/smb_common_darwin.go +++ b/pkg/smb/smb_common_darwin.go @@ -1,3 +1,4 @@ +//go:build darwin // +build darwin /* diff --git a/pkg/smb/smb_common_linux.go b/pkg/smb/smb_common_linux.go index 73d15b638..7c356866b 100644 --- a/pkg/smb/smb_common_linux.go +++ b/pkg/smb/smb_common_linux.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux /* diff --git a/pkg/smb/smb_common_windows.go b/pkg/smb/smb_common_windows.go index d98d655e4..60b242468 100644 --- a/pkg/smb/smb_common_windows.go +++ b/pkg/smb/smb_common_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows /*