aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGravatar Yong Tang <yong.tang.github@outlook.com> 2022-02-17 23:11:45 -0800
committerGravatar GitHub <noreply@github.com> 2022-02-17 23:11:45 -0800
commit2f020dcb308ddbc806c06b8a7dfb879f13cde58e (patch)
tree4d41e96e856cdbb356ac929f87e2c28dabffbc2e /test
parentc0c72e589471ff8b1b069714a1c46a16891e22b3 (diff)
downloadcoredns-2f020dcb308ddbc806c06b8a7dfb879f13cde58e.tar.gz
coredns-2f020dcb308ddbc806c06b8a7dfb879f13cde58e.tar.zst
coredns-2f020dcb308ddbc806c06b8a7dfb879f13cde58e.zip
Update to use the latest protobuf package to build pb (#5193)
* Update to use the latest protobuf package to build pb The pb package was generated some time ago with old version of https://github.com/golang/protobuf which was deprecated and in favor of google.golang.org/protobuf (see deprecation notice in https://pkg.go.dev/github.com/golang/protobuf) This PR updates the generation of pb package with v1.27.1 of google.golang.org/protobuf. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Exclude pb from import test Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'test')
-rw-r--r--test/presubmit_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/presubmit_test.go b/test/presubmit_test.go
index 903661ba0..b94beb31b 100644
--- a/test/presubmit_test.go
+++ b/test/presubmit_test.go
@@ -250,6 +250,10 @@ func (w *testImportOrderingWalker) walk(path string, info os.FileInfo, _ error)
if filepath.Ext(path) != ".go" {
return nil
}
+ // pb files are autogenerated by protoc
+ if strings.HasPrefix(path, "../pb/") {
+ return nil
+ }
fs := token.NewFileSet()
f, err := parser.ParseFile(fs, path, nil, parser.AllErrors)