mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 19:39:58 +00:00
TUN-9016: update go to 1.24
## Summary Update several moving parts of cloudflared build system: * use goboring 1.24.2 in cfsetup * update linter and fix lint issues * update packages namely **quic-go and net** * install script for macos * update docker files to use go 1.24.1 * remove usage of cloudflare-go * pin golang linter Closes TUN-9016
This commit is contained in:
19
vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
generated
vendored
19
vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
generated
vendored
@@ -2,15 +2,14 @@
|
||||
// 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
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
|
||||
"google.golang.org/protobuf/internal/protolazy"
|
||||
)
|
||||
|
||||
const UnsafeEnabled = true
|
||||
@@ -23,7 +22,7 @@ type Pointer unsafe.Pointer
|
||||
type offset uintptr
|
||||
|
||||
// offsetOf returns a field offset for the struct field.
|
||||
func offsetOf(f reflect.StructField, x exporter) offset {
|
||||
func offsetOf(f reflect.StructField) offset {
|
||||
return offset(f.Offset)
|
||||
}
|
||||
|
||||
@@ -50,7 +49,7 @@ func pointerOfValue(v reflect.Value) pointer {
|
||||
}
|
||||
|
||||
// pointerOfIface returns the pointer portion of an interface.
|
||||
func pointerOfIface(v interface{}) pointer {
|
||||
func pointerOfIface(v any) pointer {
|
||||
type ifaceHeader struct {
|
||||
Type unsafe.Pointer
|
||||
Data unsafe.Pointer
|
||||
@@ -80,7 +79,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value {
|
||||
|
||||
// AsIfaceOf treats p as a pointer to an object of type t and returns the value.
|
||||
// It is equivalent to p.AsValueOf(t).Interface()
|
||||
func (p pointer) AsIfaceOf(t reflect.Type) interface{} {
|
||||
func (p pointer) AsIfaceOf(t reflect.Type) any {
|
||||
// TODO: Use tricky unsafe magic to directly create ifaceHeader.
|
||||
return p.AsValueOf(t).Interface()
|
||||
}
|
||||
@@ -112,8 +111,14 @@ func (p pointer) StringSlice() *[]string { return (*[]string)(p.p
|
||||
func (p pointer) Bytes() *[]byte { return (*[]byte)(p.p) }
|
||||
func (p pointer) BytesPtr() **[]byte { return (**[]byte)(p.p) }
|
||||
func (p pointer) BytesSlice() *[][]byte { return (*[][]byte)(p.p) }
|
||||
func (p pointer) WeakFields() *weakFields { return (*weakFields)(p.p) }
|
||||
func (p pointer) Extensions() *map[int32]ExtensionField { return (*map[int32]ExtensionField)(p.p) }
|
||||
func (p pointer) LazyInfoPtr() **protolazy.XXX_lazyUnmarshalInfo {
|
||||
return (**protolazy.XXX_lazyUnmarshalInfo)(p.p)
|
||||
}
|
||||
|
||||
func (p pointer) PresenceInfo() presence {
|
||||
return presence{P: p.p}
|
||||
}
|
||||
|
||||
func (p pointer) Elem() pointer {
|
||||
return pointer{p: *(*unsafe.Pointer)(p.p)}
|
||||
|
Reference in New Issue
Block a user