mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
build: move e2e dependencies into e2e/go.mod
Several packages are only used while running the e2e suite. These packages are less important to update, as the they can not influence the final executable that is part of the Ceph-CSI container-image. By moving these dependencies out of the main Ceph-CSI go.mod, it is easier to identify if a reported CVE affects Ceph-CSI, or only the testing (like most of the Kubernetes CVEs). Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
15da101b1b
commit
bec6090996
58
e2e/vendor/github.com/modern-go/reflect2/safe_field.go
generated
vendored
Normal file
58
e2e/vendor/github.com/modern-go/reflect2/safe_field.go
generated
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
package reflect2
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type safeField struct {
|
||||
reflect.StructField
|
||||
}
|
||||
|
||||
func (field *safeField) Offset() uintptr {
|
||||
return field.StructField.Offset
|
||||
}
|
||||
|
||||
func (field *safeField) Name() string {
|
||||
return field.StructField.Name
|
||||
}
|
||||
|
||||
func (field *safeField) PkgPath() string {
|
||||
return field.StructField.PkgPath
|
||||
}
|
||||
|
||||
func (field *safeField) Type() Type {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (field *safeField) Tag() reflect.StructTag {
|
||||
return field.StructField.Tag
|
||||
}
|
||||
|
||||
func (field *safeField) Index() []int {
|
||||
return field.StructField.Index
|
||||
}
|
||||
|
||||
func (field *safeField) Anonymous() bool {
|
||||
return field.StructField.Anonymous
|
||||
}
|
||||
|
||||
func (field *safeField) Set(obj interface{}, value interface{}) {
|
||||
val := reflect.ValueOf(obj).Elem()
|
||||
val.FieldByIndex(field.Index()).Set(reflect.ValueOf(value).Elem())
|
||||
}
|
||||
|
||||
func (field *safeField) UnsafeSet(obj unsafe.Pointer, value unsafe.Pointer) {
|
||||
panic("unsafe operation is not supported")
|
||||
}
|
||||
|
||||
func (field *safeField) Get(obj interface{}) interface{} {
|
||||
val := reflect.ValueOf(obj).Elem().FieldByIndex(field.Index())
|
||||
ptr := reflect.New(val.Type())
|
||||
ptr.Elem().Set(val)
|
||||
return ptr.Interface()
|
||||
}
|
||||
|
||||
func (field *safeField) UnsafeGet(obj unsafe.Pointer) unsafe.Pointer {
|
||||
panic("does not support unsafe operation")
|
||||
}
|
Reference in New Issue
Block a user