mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-29 18:32:46 +00:00
all: remove Go 1.17 build tags / workarounds
related to golang/protobuf#1613 Change-Id: Ie4255c24c1b79b13aab763a75125836191088d26 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/585096 Reviewed-by: Lasse Folger <lassefolger@google.com> Auto-Submit: Michael Stapelberg <stapelberg@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
f7dca67dc5
commit
15d7b138c5
@ -2,10 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Go native fuzzing was added in go1.18. Remove this once we stop supporting
|
||||
// go1.17.
|
||||
//go:build go1.18
|
||||
|
||||
package protojson_test
|
||||
|
||||
import (
|
||||
|
@ -2,10 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Go native fuzzing was added in go1.18. Remove this once we stop supporting
|
||||
// go1.17.
|
||||
//go:build go1.18
|
||||
|
||||
package prototext_test
|
||||
|
||||
import (
|
||||
|
@ -18,7 +18,6 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
@ -560,15 +559,9 @@ func race() bool {
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
// Use reflect because the debug.BuildInfo.Settings field
|
||||
// isn't available in Go 1.17.
|
||||
s := reflect.ValueOf(bi).Elem().FieldByName("Settings")
|
||||
if !s.IsValid() {
|
||||
return false
|
||||
}
|
||||
for i := 0; i < s.Len(); i++ {
|
||||
if s.Index(i).FieldByName("Key").String() == "-race" {
|
||||
return s.Index(i).FieldByName("Value").String() == "true"
|
||||
for _, setting := range bi.Settings {
|
||||
if setting.Key == "-race" {
|
||||
return setting.Value == "true"
|
||||
}
|
||||
}
|
||||
return false
|
||||
|
@ -2,10 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Go native fuzzing was added in go1.18. Remove this once we stop supporting
|
||||
// go1.17.
|
||||
//go:build go1.18
|
||||
|
||||
package proto_test
|
||||
|
||||
import (
|
||||
|
Loading…
x
Reference in New Issue
Block a user