Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 141 for subfield (0.34 sec)

  1. staging/src/k8s.io/apimachinery/pkg/api/apitesting/fuzzer/valuefuzz.go

    			}
    		}
    	case reflect.Interface, reflect.Pointer:
    		if obj.IsNil() {
    			// TODO: set non-nil value
    		} else {
    			valueFuzz(obj.Elem())
    		}
    	case reflect.Struct:
    		for i, n := 0, obj.NumField(); i < n; i++ {
    			valueFuzz(obj.Field(i))
    		}
    	case reflect.Map:
    		if obj.IsNil() {
    			// TODO: set non-nil value
    		} else {
    			for _, k := range obj.MapKeys() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  2. src/cmd/gofmt/rewrite.go

    	}
    
    	switch v := reflect.Indirect(val); v.Kind() {
    	case reflect.Slice:
    		for i := 0; i < v.Len(); i++ {
    			e := v.Index(i)
    			set(e, f(e))
    		}
    	case reflect.Struct:
    		for i := 0; i < v.NumField(); i++ {
    			e := v.Field(i)
    			set(e, f(e))
    		}
    	case reflect.Interface:
    		e := v.Elem()
    		set(v, f(e))
    	}
    	return val
    }
    
    func isWildcard(s string) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 27 22:07:13 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  3. src/internal/goexperiment/mkconsts.go

    		}
    		if err := os.Remove(name); err != nil {
    			log.Fatal(err)
    		}
    	}
    
    	// Generate new experiment constant files.
    	rt := reflect.TypeOf(&goexperiment.Flags{}).Elem()
    	for i := 0; i < rt.NumField(); i++ {
    		f := rt.Field(i).Name
    		buildTag := "goexperiment." + strings.ToLower(f)
    		for _, val := range []bool{false, true} {
    			name := fmt.Sprintf("exp_%s_%s.go", strings.ToLower(f), pick(val, "off", "on"))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:27 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  4. src/go/internal/gccgoimporter/testdata/v1reflect.gox

    <type 34 [] <type -11>>) <type 30>; FieldByName (name <type -16>) (? <type 30>, ? <type -15>); FieldByNameFunc (match <type 35 (? <type -16>) <type -15>>) (? <type 30>, ? <type -15>); In (i <type -11>) <type 26>; Key () <type 26>; Len () <type -11>; NumField () <type -11>; NumIn () <type -11>; NumOut () <type -11>; Out (i <type -11>) <type 26>; .reflect.runtimeType () <type 36 *<type 22>>; .reflect.common () <type 37 *<type 4>>; .reflect.uncommon () <type 38 *<type 12>>; }>>; Func <type 1>; Index <type...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 30 21:33:51 UTC 2021
    - 10.3K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/helper.go

    func UnsafeObjectConvertor(scheme *Scheme) ObjectConvertor {
    	return unsafeObjectConvertor{scheme}
    }
    
    // SetField puts the value of src, into fieldName, which must be a member of v.
    // The value of src must be assignable to the field.
    func SetField(src interface{}, v reflect.Value, fieldName string) error {
    	field := v.FieldByName(fieldName)
    	if !field.IsValid() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Dec 13 22:54:34 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/convert_test.go

    	f.MaxDepth(2)
    	f.NilChance(0.5)
    
    	for i := 0; i < 10000; i++ {
    		// fuzz a random field in JSONSchemaProps
    		origSchema := &apiextensions.JSONSchemaProps{}
    		x := reflect.ValueOf(origSchema).Elem()
    		n := rand.Intn(x.NumField())
    		if name := x.Type().Field(n).Name; name == "Example" || name == "ExternalDocs" {
    			// we drop these intentionally
    			continue
    		}
    		f.Fuzz(x.Field(n).Addr().Interface())
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 23 02:09:41 UTC 2022
    - 2.9K bytes
    - Viewed (0)
  7. pkg/proto/merge/merge.go

    	return func(options mergeOptions) mergeOptions {
    		options.customMergeFn[name] = function
    		return options
    	}
    }
    
    // ReplaceMergeFn instead of merging all subfields one by one, takes src and set it to dest
    var ReplaceMergeFn MergeFunction = func(dst, src protoreflect.Message) {
    	dst.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {
    		dst.Clear(fd)
    		return true
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Dec 21 17:31:22 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  8. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/accessors/GeneratePluginSpecBuilderAccessors.kt

    import org.gradle.kotlin.dsl.support.bytecode.InternalNameOf
    import org.gradle.kotlin.dsl.support.bytecode.LDC
    import org.gradle.kotlin.dsl.support.bytecode.NEW
    import org.gradle.kotlin.dsl.support.bytecode.PUTFIELD
    import org.gradle.kotlin.dsl.support.bytecode.RETURN
    import org.gradle.kotlin.dsl.support.bytecode.addKmProperty
    import org.gradle.kotlin.dsl.support.bytecode.internalName
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Nov 22 09:41:28 UTC 2023
    - 15.7K bytes
    - Viewed (0)
  9. platforms/core-execution/snapshots/src/test/groovy/org/gradle/internal/vfs/impl/DefaultFileSystemAccessTest.groovy

            when:
            allowFileSystemAccess(false)
            snapshot = read(someFile)
            then:
            assertIsFileSnapshot(snapshot, someFile)
    
            def missingSubfile = someFile.file("subfile/which/is/deep.txt")
            when:
            snapshot = read(missingSubfile)
            then:
            assertIsMissingFileSnapshot(snapshot, missingSubfile)
        }
    
        def "can read a missing file"() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Nov 22 09:41:32 UTC 2023
    - 10K bytes
    - Viewed (0)
  10. platforms/core-runtime/base-asm/src/main/java/org/gradle/model/internal/asm/MethodVisitorScope.java

    import static org.objectweb.asm.Opcodes.INVOKEVIRTUAL;
    import static org.objectweb.asm.Opcodes.IRETURN;
    import static org.objectweb.asm.Opcodes.NEW;
    import static org.objectweb.asm.Opcodes.POP;
    import static org.objectweb.asm.Opcodes.PUTFIELD;
    import static org.objectweb.asm.Opcodes.PUTSTATIC;
    import static org.objectweb.asm.Opcodes.RETURN;
    import static org.objectweb.asm.Opcodes.SWAP;
    import static org.objectweb.asm.Type.getMethodDescriptor;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 02 15:31:29 UTC 2024
    - 12.4K bytes
    - Viewed (0)
Back to top