- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 3,055 for REFLECT (0.5 sec)
-
staging/src/k8s.io/cli-runtime/pkg/printers/json.go
// we use reflect.Indirect here in order to obtain the actual value from a pointer. // we need an actual value in order to retrieve the package path for an object. // using reflect.Indirect indiscriminately is valid here, as all runtime.Objects are supposed to be pointers. if InternalObjectPreventer.IsForbidden(reflect.Indirect(reflect.ValueOf(obj)).Type().PkgPath()) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 10 11:23:25 UTC 2021 - 2.3K bytes - Viewed (0) -
test/fixedbugs/issue48357.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 13 18:38:15 UTC 2021 - 360 bytes - Viewed (0) -
src/cmd/go/internal/generate/generate_test.go
for _, test := range splitTests { // First with newlines. got := g.split("//go:generate " + test.in + "\n") if !reflect.DeepEqual(got, test.out) { t.Errorf("split(%q): got %q expected %q", test.in, got, test.out) } // Then with CRLFs, thank you Windows. got = g.split("//go:generate " + test.in + "\r\n") if !reflect.DeepEqual(got, test.out) { t.Errorf("split(%q): got %q expected %q", test.in, got, test.out) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 20 14:09:12 UTC 2022 - 7.4K bytes - Viewed (0) -
test/recover.go
return nil } func test15() { f := reflect.MakeFunc(reflect.TypeOf((func())(nil)), reflectFunc).Interface().(func()) defer f() panic(15) } func reflectFunc2(args []reflect.Value) (results []reflect.Value) { // This will call reflectFunc3 args[0].Interface().(func())() return nil } func reflectFunc3(args []reflect.Value) (results []reflect.Value) { if v := recover(); v != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 10.6K bytes - Viewed (0) -
src/internal/unsafeheader/unsafeheader_test.go
import ( "bytes" "internal/unsafeheader" "reflect" "testing" "unsafe" ) // TestTypeMatchesReflectType ensures that the name and layout of the // unsafeheader types matches the corresponding Header types in the reflect // package. func TestTypeMatchesReflectType(t *testing.T) { t.Run("Slice", func(t *testing.T) { testHeaderMatchesReflect(t, unsafeheader.Slice{}, reflect.SliceHeader{}) })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 2.9K bytes - Viewed (0) -
test/reflectmethod5.go
// license that can be found in the LICENSE file. // Issue 38515: failed to mark the method wrapper // reflect.Type.Method itself as REFLECTMETHOD. package main import "reflect" var called bool type foo struct{} func (foo) X() { called = true } var h = reflect.Type.Method func main() { v := reflect.ValueOf(foo{}) m := h(v.Type(), 0) f := m.Func.Interface().(func(foo)) f(foo{}) if !called {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 19 03:12:32 UTC 2020 - 544 bytes - Viewed (0) -
src/cmd/fix/cftype.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 00:25:49 UTC 2023 - 3.5K bytes - Viewed (0) -
test/reflectmethod7.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 26 14:24:17 UTC 2021 - 421 bytes - Viewed (0) -
test/fixedbugs/issue15439.go
// license that can be found in the LICENSE file. package main import "reflect" func main() { a := &struct{ x int }{} b := &struct{ x int "" }{} ta := reflect.TypeOf(a) tb := reflect.TypeOf(b) // Ensure cmd/compile treats absent and empty tags as equivalent. a = b // Ensure package reflect treats absent and empty tags as equivalent. if !tb.AssignableTo(ta) { panic("fail") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 25 21:28:45 UTC 2016 - 514 bytes - Viewed (0) -
pkg/proxy/apis/config/register_test.go
GroupName: GroupName, SchemeGroupVersion: SchemeGroupVersion, AddToScheme: AddToScheme, AllowedTags: map[reflect.Type]bool{ reflect.TypeOf(metav1.TypeMeta{}): true, reflect.TypeOf(metav1.Duration{}): true, reflect.TypeOf(logsapi.LoggingConfiguration{}): true, }, } if err := componentconfigtesting.VerifyInternalTypePackage(pkginfo); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jul 13 06:33:33 UTC 2023 - 1.4K bytes - Viewed (0)