all: gofmt all
Change-Id: I1d42c8d784440a0b7e40b4f0b8da54be0fb338a6
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/370054
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Florian Zenker <floriank@google.com>
diff --git a/integration_test.go b/integration_test.go
index dfcfd10..078a1ff 100644
--- a/integration_test.go
+++ b/integration_test.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build ignore
// +build ignore
package main
diff --git a/internal/errors/is_go112.go b/internal/errors/is_go112.go
index f90e909..fbcd349 100644
--- a/internal/errors/is_go112.go
+++ b/internal/errors/is_go112.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !go1.13
// +build !go1.13
package errors
diff --git a/internal/errors/is_go113.go b/internal/errors/is_go113.go
index dc05f41..5e72f1c 100644
--- a/internal/errors/is_go113.go
+++ b/internal/errors/is_go113.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build go1.13
// +build go1.13
package errors
diff --git a/internal/flags/proto_legacy_disable.go b/internal/flags/proto_legacy_disable.go
index a72995f..bda8e8c 100644
--- a/internal/flags/proto_legacy_disable.go
+++ b/internal/flags/proto_legacy_disable.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !protolegacy
// +build !protolegacy
package flags
diff --git a/internal/flags/proto_legacy_enable.go b/internal/flags/proto_legacy_enable.go
index 772e2f0..6d8d9bd 100644
--- a/internal/flags/proto_legacy_enable.go
+++ b/internal/flags/proto_legacy_enable.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build protolegacy
// +build protolegacy
package flags
diff --git a/internal/impl/codec_map_go111.go b/internal/impl/codec_map_go111.go
index 2706bb6..4b15493 100644
--- a/internal/impl/codec_map_go111.go
+++ b/internal/impl/codec_map_go111.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !go1.12
// +build !go1.12
package impl
diff --git a/internal/impl/codec_map_go112.go b/internal/impl/codec_map_go112.go
index 1533ef6..0b31b66 100644
--- a/internal/impl/codec_map_go112.go
+++ b/internal/impl/codec_map_go112.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build go1.12
// +build go1.12
package impl
diff --git a/internal/impl/codec_reflect.go b/internal/impl/codec_reflect.go
index 90705e3..145c577 100644
--- a/internal/impl/codec_reflect.go
+++ b/internal/impl/codec_reflect.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build purego || appengine
// +build purego appengine
package impl
diff --git a/internal/impl/codec_unsafe.go b/internal/impl/codec_unsafe.go
index e118af1..757642e 100644
--- a/internal/impl/codec_unsafe.go
+++ b/internal/impl/codec_unsafe.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !purego && !appengine
// +build !purego,!appengine
package impl
diff --git a/internal/impl/pointer_reflect.go b/internal/impl/pointer_reflect.go
index 9e3ed82..4c491bd 100644
--- a/internal/impl/pointer_reflect.go
+++ b/internal/impl/pointer_reflect.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build purego || appengine
// +build purego appengine
package impl
diff --git a/internal/impl/pointer_unsafe.go b/internal/impl/pointer_unsafe.go
index 9ecf23a..ee0e057 100644
--- a/internal/impl/pointer_unsafe.go
+++ b/internal/impl/pointer_unsafe.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !purego && !appengine
// +build !purego,!appengine
package impl
diff --git a/internal/strs/strings_pure.go b/internal/strs/strings_pure.go
index 85e074c..a1f6f33 100644
--- a/internal/strs/strings_pure.go
+++ b/internal/strs/strings_pure.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build purego || appengine
// +build purego appengine
package strs
diff --git a/internal/strs/strings_unsafe.go b/internal/strs/strings_unsafe.go
index 2160c70..56a8a4e 100644
--- a/internal/strs/strings_unsafe.go
+++ b/internal/strs/strings_unsafe.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !purego && !appengine
// +build !purego,!appengine
package strs
diff --git a/internal/testprotos/nullable/methods_test.go b/internal/testprotos/nullable/methods_test.go
index 8e22ab2..c694810 100644
--- a/internal/testprotos/nullable/methods_test.go
+++ b/internal/testprotos/nullable/methods_test.go
@@ -6,6 +6,7 @@
// only test compatibility with the Marshal/Unmarshal functionality with
// pure protobuf reflection since there is no support for nullable fields
// in the table-driven implementation.
+//go:build protoreflect
// +build protoreflect
package nullable
diff --git a/internal/weakdeps/weakdeps.go b/internal/weakdeps/weakdeps.go
index 59b3475..e8261fb 100644
--- a/internal/weakdeps/weakdeps.go
+++ b/internal/weakdeps/weakdeps.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build weak_dependency
// +build weak_dependency
package weakdeps
diff --git a/proto/methods_test.go b/proto/methods_test.go
index b1dcce3..203d42a 100644
--- a/proto/methods_test.go
+++ b/proto/methods_test.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// The protoreflect tag disables fast-path methods, including legacy ones.
+//go:build !protoreflect
// +build !protoreflect
package proto_test
diff --git a/proto/proto_methods.go b/proto/proto_methods.go
index d8dd604..465e057 100644
--- a/proto/proto_methods.go
+++ b/proto/proto_methods.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// The protoreflect build tag disables use of fast-path methods.
+//go:build !protoreflect
// +build !protoreflect
package proto
diff --git a/proto/proto_reflect.go b/proto/proto_reflect.go
index b103d43..494d6ce 100644
--- a/proto/proto_reflect.go
+++ b/proto/proto_reflect.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// The protoreflect build tag disables use of fast-path methods.
+//go:build protoreflect
// +build protoreflect
package proto
diff --git a/reflect/protoreflect/value_pure.go b/reflect/protoreflect/value_pure.go
index 918e685..7ced876 100644
--- a/reflect/protoreflect/value_pure.go
+++ b/reflect/protoreflect/value_pure.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build purego || appengine
// +build purego appengine
package protoreflect
diff --git a/reflect/protoreflect/value_unsafe.go b/reflect/protoreflect/value_unsafe.go
index c45debd..702ddf2 100644
--- a/reflect/protoreflect/value_unsafe.go
+++ b/reflect/protoreflect/value_unsafe.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !purego && !appengine
// +build !purego,!appengine
package protoreflect