Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 2,526 for REFLECT (0.15 sec)

  1. src/cmd/cgo/internal/testshared/testdata/exe/exe.go

    	// exercising https://golang.org/issues/17594
    	reflect.TypeOf(os.Stdout).Elem()
    	runtime.GC()
    	depBase.V = depBase.F() + 1
    
    	var c *C
    	if reflect.TypeOf(F).Out(0) != reflect.TypeOf(c) {
    		panic("bad reflection results, see golang.org/issue/18252")
    	}
    
    	sp := reflect.New(reflect.TypeOf(slicePtr).Elem())
    	s := sp.Interface()
    
    	if reflect.TypeOf(s) != reflect.TypeOf(slicePtr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 906 bytes
    - Viewed (0)
  2. callbacks/preload.go

    			if reflectFieldValue.Kind() == reflect.Ptr && reflectFieldValue.IsNil() {
    				reflectFieldValue.Set(reflect.New(rel.Field.FieldType.Elem()))
    			}
    
    			reflectFieldValue = reflect.Indirect(reflectFieldValue)
    			switch reflectFieldValue.Kind() {
    			case reflect.Struct:
    				tx.AddError(rel.Field.Set(tx.Statement.Context, data, elem.Interface()))
    			case reflect.Slice, reflect.Array:
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:52:33 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. src/internal/types/testdata/check/importdecl0/importdecl0a.go

    	_ "math/big"
    )
    
    import "fmt"
    import f1 "fmt"
    import f2 "fmt"
    
    // reflect.flag must not be visible in this package
    type flag int
    type _ reflect.flag /* ERROR "name flag not exported by package reflect" */
    
    // imported package name may conflict with local objects
    type reflect /* ERROR "reflect already declared" */ int
    
    // dot-imported exported objects may conflict with local objects
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  4. src/encoding/gob/encoder.go

    	}
    	// Now send the inner types
    	switch st := actual; st.Kind() {
    	case reflect.Struct:
    		for i := 0; i < st.NumField(); i++ {
    			if isExported(st.Field(i).Name) {
    				enc.sendType(w, state, st.Field(i).Type)
    			}
    		}
    	case reflect.Array, reflect.Slice:
    		enc.sendType(w, state, st.Elem())
    	case reflect.Map:
    		enc.sendType(w, state, st.Key())
    		enc.sendType(w, state, st.Elem())
    	}
    	return true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  5. test/fixedbugs/issue57184.go

    package main
    
    import (
    	"log"
    	"reflect"
    	"sort"
    )
    
    func main() {
    	const length = 257
    	x := make([]int64, length)
    	for i := 0; i < length; i++ {
    		x[i] = int64(i) * 27644437 % int64(length)
    	}
    
    	isLessStatic := func(i, j int) bool {
    		return x[i] < x[j]
    	}
    
    	isLessReflect := reflect.MakeFunc(reflect.TypeOf(isLessStatic), func(args []reflect.Value) []reflect.Value {
    		i := args[0].Int()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 09 21:38:33 UTC 2022
    - 851 bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/testsanitizers/testdata/msan5.go

    	Go2(a);
    	if (a[0] != 42) {
    		abort();
    	}
    }
    */
    import "C"
    
    import (
    	"reflect"
    	"unsafe"
    )
    
    //export Go1
    func Go1(p *C.int) {
    	reflect.ValueOf(p).Elem().Set(reflect.ValueOf(C.int(42)))
    }
    
    //export Go2
    func Go2(p *C.char) {
    	a := (*[2]byte)(unsafe.Pointer(p))
    	reflect.Copy(reflect.ValueOf(a[:1]), reflect.ValueOf(a[1:]))
    }
    
    func main() {
    	C.C1()
    	C.C2()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 904 bytes
    - Viewed (0)
  7. callbacks/callmethod.go

    package callbacks
    
    import (
    	"reflect"
    
    	"gorm.io/gorm"
    )
    
    func callMethod(db *gorm.DB, fc func(value interface{}, tx *gorm.DB) bool) {
    	tx := db.Session(&gorm.Session{NewDB: true})
    	if called := fc(db.Statement.ReflectValue.Interface(), tx); !called {
    		switch db.Statement.ReflectValue.Kind() {
    		case reflect.Slice, reflect.Array:
    			db.Statement.CurDestIndex = 0
    			for i := 0; i < db.Statement.ReflectValue.Len(); i++ {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Feb 18 01:20:29 UTC 2023
    - 846 bytes
    - Viewed (0)
  8. src/crypto/tls/handshake_messages_test.go

    	m := &certificateStatusMsg{}
    	m.response = randomBytes(rand.Intn(10)+1, rand)
    	return reflect.ValueOf(m)
    }
    
    func (*clientKeyExchangeMsg) Generate(rand *rand.Rand, size int) reflect.Value {
    	m := &clientKeyExchangeMsg{}
    	m.ciphertext = randomBytes(rand.Intn(1000)+1, rand)
    	return reflect.ValueOf(m)
    }
    
    func (*finishedMsg) Generate(rand *rand.Rand, size int) reflect.Value {
    	m := &finishedMsg{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  9. pkg/config/schema/collections/collections.agent.gen.go

    		VersionAliases: []string{
    			"v1",
    		},
    		Proto: "istio.security.v1beta1.AuthorizationPolicy", StatusProto: "istio.meta.v1alpha1.IstioStatus",
    		ReflectType: reflect.TypeOf(&istioioapisecurityv1beta1.AuthorizationPolicy{}).Elem(), StatusType: reflect.TypeOf(&istioioapimetav1alpha1.IstioStatus{}).Elem(),
    		ProtoPackage: "istio.io/api/security/v1beta1", StatusPackage: "istio.io/api/meta/v1alpha1",
    		ClusterScoped: false,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  10. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/provider/ScriptApiTest.kt

    import org.junit.Test
    import kotlin.reflect.KCallable
    import kotlin.reflect.KClass
    import kotlin.reflect.KFunction
    import kotlin.reflect.KMutableProperty
    import kotlin.reflect.KParameter
    import kotlin.reflect.KProperty
    import kotlin.reflect.KType
    import kotlin.reflect.KTypeProjection
    import kotlin.reflect.KVariance
    import kotlin.reflect.KVisibility
    import kotlin.reflect.full.createType
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 9K bytes
    - Viewed (0)
Back to top