Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 1,740 for REFLECT (0.2 sec)

  1. schema/serializer.go

    	switch v := fieldValue.(type) {
    	case int64, int, uint, uint64, int32, uint32, int16, uint16:
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	case *int64, *int, *uint, *uint64, *int32, *uint32, *int16, *uint16:
    		if rv.IsZero() {
    			return nil, nil
    		}
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	default:
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Mar 18 08:28:46 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. test/fixedbugs/issue26335.go

    // reflect.Value.Call.
    
    package main
    
    import (
    	"reflect"
    )
    
    type Empty struct {
    	f1, f2 *byte
    	empty struct{}
    }
    
    func F(e Empty, s []string) {
    	if len(s) != 1 || s[0] != "hi" {
    		panic("bad slice")
    	}
    }
    
    func main() {
    	reflect.ValueOf(F).Call([]reflect.Value{
    		reflect.ValueOf(Empty{}),
    		reflect.ValueOf([]string{"hi"}),
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 11 18:14:35 UTC 2018
    - 563 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. test/fixedbugs/issue49110.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import "reflect"
    
    func main() {
    	_ = reflect.StructOf([]reflect.StructField{
    		{Name: "_", PkgPath: "main", Type: reflect.TypeOf(int(0))},
    		{Name: "_", PkgPath: "main", Type: reflect.TypeOf(int(0))},
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 27 21:35:48 UTC 2021
    - 389 bytes
    - Viewed (0)
  8. 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)
  9. test/fixedbugs/issue16331.go

    package main
    
    import "reflect"
    
    type T struct{}
    
    func (T) M() {
    }
    
    func F(args []reflect.Value) (results []reflect.Value) {
    	return nil
    }
    
    func main() {
    	done := make(chan bool)
    	go func() {
    		// Test reflect.makeFuncStub.
    		t := reflect.TypeOf((func())(nil))
    		f := reflect.MakeFunc(t, F).Interface().(func())
    		defer f()
    		growstack(10000)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 17 18:57:01 UTC 2016
    - 839 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