- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 1,740 for REFLECT (0.09 sec)
-
src/cmd/link/internal/ld/testdata/deadcode/ifacemethod6.go
package main import "reflect" type S int func (s S) M() { println("S.M") } func (s S) N() { println("S.N") } type T float64 func (t T) F(s S) {} func main() { var t T meth, _ := reflect.TypeOf(t).MethodByName("F") ft := meth.Type at := ft.In(1) v := reflect.New(at).Elem() methV := v.MethodByName("M") methV.Call([]reflect.Value{v})
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 01 15:07:26 UTC 2023 - 666 bytes - Viewed (0) -
src/cmd/link/internal/ld/testdata/deadcode/reflectcall.go
// license that can be found in the LICENSE file. // This example uses reflect.Value.Call, but not // reflect.{Value,Type}.Method. This should not // need to bring all methods live. package main import "reflect" func f() { println("call") } type T int func (T) M() {} func main() { v := reflect.ValueOf(f) v.Call(nil) i := interface{}(T(1)) println(i)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 01 18:04:59 UTC 2020 - 474 bytes - Viewed (0) -
callbacks/helper.go
} return } } type visitMap = map[reflect.Value]bool // Check if circular values, return true if loaded func loadOrStoreVisitMap(visitMap *visitMap, v reflect.Value) (loaded bool) { if v.Kind() == reflect.Ptr { v = v.Elem() } switch v.Kind() { case reflect.Slice, reflect.Array: loaded = true for i := 0; i < v.Len(); i++ {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Thu Apr 14 12:32:57 UTC 2022 - 3.7K bytes - Viewed (0) -
test/reflectmethod6.go
// license that can be found in the LICENSE file. // Similar to reflectmethod5.go, but for reflect.Type.MethodByName. package main import "reflect" var called bool type foo struct{} func (foo) X() { called = true } var h = reflect.Type.MethodByName func main() { v := reflect.ValueOf(foo{}) m, ok := h(v.Type(), "X") if !ok { panic("FAIL") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 19 03:12:32 UTC 2020 - 555 bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/issue18584/plugin.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 326 bytes - Viewed (0) -
pkg/kubelet/cadvisor/testing/cadvisor_mock.go
// Generated by this command: // // mockgen -source=types.go -destination=testing/cadvisor_mock.go -package=testing Interface // // Package testing is a generated GoMock package. package testing import ( reflect "reflect" v1 "github.com/google/cadvisor/info/v1" v2 "github.com/google/cadvisor/info/v2" gomock "go.uber.org/mock/gomock" ) // MockInterface is a mock of Interface interface. type MockInterface struct {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 08:12:16 UTC 2024 - 8.4K bytes - Viewed (0) -
pkg/proxy/util/localdetector_test.go
} ifLocal := localDetector.IfLocal() ifNotLocal := localDetector.IfNotLocal() if !reflect.DeepEqual(ifLocal, c.expectedIfLocalOutput) { t.Errorf("IfLocal, expected: '%v', but got: '%v'", c.expectedIfLocalOutput, ifLocal) } if !reflect.DeepEqual(ifNotLocal, c.expectedIfNotLocalOutput) { t.Errorf("IfNotLocal, expected: '%v', but got: '%v'", c.expectedIfNotLocalOutput, ifNotLocal) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Apr 26 15:34:37 UTC 2024 - 4.1K bytes - Viewed (0) -
platforms/core-configuration/declarative-dsl-core/src/main/kotlin/org/gradle/internal/declarativedsl/mappingToJvm/RuntimePropertyResolver.kt
import org.gradle.internal.declarativedsl.mappingToJvm.RuntimePropertyResolver.WriteResolution.UnresolvedWrite import java.lang.reflect.Modifier import kotlin.reflect.KClass import kotlin.reflect.KMutableProperty import kotlin.reflect.KProperty import kotlin.reflect.KVisibility import kotlin.reflect.full.memberFunctions import kotlin.reflect.full.memberProperties interface RuntimePropertyResolver {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Mar 25 17:34:03 UTC 2024 - 5.7K bytes - Viewed (0) -
pkg/util/slice/slice_test.go
limitations under the License. */ package slice import ( "reflect" "testing" ) func TestCopyStrings(t *testing.T) { var src1 []string dest1 := CopyStrings(src1) if !reflect.DeepEqual(src1, dest1) { t.Errorf("%v and %v are not equal", src1, dest1) } src2 := []string{} dest2 := CopyStrings(src2) if !reflect.DeepEqual(src2, dest2) { t.Errorf("%v and %v are not equal", src2, dest2) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 30 07:21:37 UTC 2022 - 3.5K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unsafeptr/unsafeptr.go
// https://golang.org/pkg/unsafe/#Pointer. switch x := astutil.Unparen(x).(type) { case *ast.SelectorExpr: // "(6) Conversion of a reflect.SliceHeader or // reflect.StringHeader Data field to or from Pointer." if x.Sel.Name != "Data" { break } // reflect.SliceHeader and reflect.StringHeader are okay, // but only if they are pointing at a real slice or string. // It's not okay to do: // var x SliceHeader
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 4.7K bytes - Viewed (0)