From 3a9e1dc314e2cb57d6cb054df513f17586295fc7 Mon Sep 17 00:00:00 2001 From: Damien Neil Date: Mon, 6 Dec 2021 14:18:55 -0800 Subject: [PATCH] all: gofmt all Change-Id: I1d42c8d784440a0b7e40b4f0b8da54be0fb338a6 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/370054 Trust: Damien Neil Run-TryBot: Damien Neil Reviewed-by: Joseph Tsai Reviewed-by: Florian Zenker --- integration_test.go | 1 + internal/errors/is_go112.go | 1 + internal/errors/is_go113.go | 1 + internal/flags/proto_legacy_disable.go | 1 + internal/flags/proto_legacy_enable.go | 1 + internal/impl/codec_map_go111.go | 1 + internal/impl/codec_map_go112.go | 1 + internal/impl/codec_reflect.go | 1 + internal/impl/codec_unsafe.go | 1 + internal/impl/pointer_reflect.go | 1 + internal/impl/pointer_unsafe.go | 1 + internal/strs/strings_pure.go | 1 + internal/strs/strings_unsafe.go | 1 + internal/testprotos/nullable/methods_test.go | 1 + internal/weakdeps/weakdeps.go | 1 + proto/methods_test.go | 1 + proto/proto_methods.go | 1 + proto/proto_reflect.go | 1 + reflect/protoreflect/value_pure.go | 1 + reflect/protoreflect/value_unsafe.go | 1 + 20 files changed, 20 insertions(+) diff --git a/integration_test.go b/integration_test.go index dfcfd1076..078a1ffa8 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 f90e909b3..fbcd34920 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 dc05f4191..5e72f1cde 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 a72995f02..bda8e8cf3 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 772e2f0e4..6d8d9bd6b 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 2706bb67f..4b15493f2 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 1533ef600..0b31b66ea 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 90705e3ae..145c577bd 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 e118af1e2..757642e23 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 9e3ed821e..4c491bdf4 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 9ecf23a85..ee0e0573e 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 85e074c97..a1f6f3338 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 2160c7019..56a8a4ed3 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 8e22ab2a1..c69481095 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 59b34758c..e8261fbde 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 b1dcce367..203d42a99 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 d8dd604f6..465e057b3 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 b103d4320..494d6ceef 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 918e685e1..7ced876f4 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 c45debdca..702ddf22a 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