Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 395 for typeOf (0.15 sec)

  1. pkg/config/analysis/local/helpers_test.go

    	Group:         "testdata.istio.io",
    	Kind:          "Kind1",
    	Plural:        "Kind1s",
    	Version:       "v1alpha1",
    	Proto:         "google.protobuf.Struct",
    	ReflectType:   reflect.TypeOf(&structpb.Struct{}).Elem(),
    	ProtoPackage:  "github.com/gogo/protobuf/types",
    	ClusterScoped: false,
    	ValidateProto: validation.EmptyValidate,
    }.MustBuild()
    
    func createTestResource(t *testing.T, ns, name, version string) *resource.Instance {
    	t.Helper()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 02 17:36:47 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. security/pkg/pki/util/crypto.go

    	default:
    		return nil, fmt.Errorf("unsupported PEM block type for a private key: %s", kb.Type)
    	}
    }
    
    // GetRSAKeySize returns the size if it is RSA key, otherwise it returns an error.
    func GetRSAKeySize(privKey crypto.PrivateKey) (int, error) {
    	if t := reflect.TypeOf(privKey); t != reflect.TypeOf(&rsa.PrivateKey{}) {
    		return 0, fmt.Errorf("key type is not RSA: %v", t)
    	}
    	pkey := privKey.(*rsa.PrivateKey)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 04 13:00:07 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. pkg/typemap/map.go

    )
    
    // TypeMap provides a map that holds a map of Type -> Value. There can be only a single value per type.
    // The value stored for a type must be of the same type as the key.
    type TypeMap struct {
    	inner map[reflect.Type]any
    }
    
    func NewTypeMap() TypeMap {
    	return TypeMap{make(map[reflect.Type]any)}
    }
    
    func Set[T any](t TypeMap, v T) {
    	interfaceType := reflect.TypeOf((*T)(nil)).Elem()
    	t.inner[interfaceType] = v
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 16:38:40 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  4. platforms/core-configuration/declarative-dsl-core/src/main/kotlin/org/gradle/internal/declarativedsl/schemaBuilder/FunctionExtractor.kt

                function.annotations.any { it is Adding } -> {
                    check(inType != null)
    
                    check(function.returnType != typeOf<Unit>() || configureLambdas.getTypeConfiguredByLambda(function.parameters.last().type) == null) {
                        "an @Adding function with a Unit return type may not accept configuring lambdas"
                    }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 16 11:58:18 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  5. src/internal/reflectlite/type.go

    	return unsafe.Pointer(uintptr(p) + x)
    }
    
    // TypeOf returns the reflection Type that represents the dynamic type of i.
    // If i is a nil interface value, TypeOf returns nil.
    func TypeOf(i any) Type {
    	return toType(abi.TypeOf(i))
    }
    
    func (t rtype) Implements(u Type) bool {
    	if u == nil {
    		panic("reflect: nil type passed to Type.Implements")
    	}
    	if u.Kind() != Interface {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  6. pkg/kube/krt/internal.go

    	// but often we will be operating on types generated by the controller itself.
    	// We should have a way to opt-in to RV comparison, but not default to it.
    
    	ap, ok := any(a).(proto.Message)
    	if ok {
    		if reflect.TypeOf(ap.ProtoReflect().Interface()) == reflect.TypeOf(ap) {
    			return proto.Equal(ap, any(b).(proto.Message))
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/roundtrip_test.go

    						t.Errorf("unexpected difference on roundtrip from interface{} to interface{}:\n%s", diff)
    					}
    				}
    
    				{
    					// original to original
    					final := reflect.New(reflect.TypeOf(original))
    					err = modePair.dec.Unmarshal(cborFromOriginal, final.Interface())
    					if err != nil {
    						t.Fatalf("unexpected error from Unmarshal into %T: %v", final.Interface(), err)
    					}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 21:48:12 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  8. subprojects/core/src/main/java/org/gradle/api/internal/tasks/properties/ValidationActions.java

            switch (type) {
                case FILE:
                    return INPUT_FILE_VALIDATOR;
                case DIRECTORY:
                    return INPUT_DIRECTORY_VALIDATOR;
                case FILES:
                    return NO_OP;
                default:
                    throw new AssertionError("Unknown input property type " + type);
            }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 11:49:03 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  9. pkg/volume/csi/csi_mounter_test.go

    			err = csiMounter.SetUp(volume.MounterArgs{})
    			if tc.setupShouldFail {
    				if err != nil {
    					if tc.exitError != nil && reflect.TypeOf(tc.exitError) != reflect.TypeOf(err) {
    						t.Fatalf("expected exitError type: %v got: %v (%v)", reflect.TypeOf(tc.exitError), reflect.TypeOf(err), err)
    					}
    					t.Log(err)
    					return
    				} else {
    					t.Error("test should fail, but no error occurred")
    				}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 50.1K bytes
    - Viewed (0)
  10. src/reflect/type.go

    }
    
    // TypeOf returns the reflection [Type] that represents the dynamic type of i.
    // If i is a nil interface value, TypeOf returns nil.
    func TypeOf(i any) Type {
    	return toType(abi.TypeOf(i))
    }
    
    // rtypeOf directly extracts the *rtype of the provided value.
    func rtypeOf(i any) *abi.Type {
    	return abi.TypeOf(i)
    }
    
    // ptrMap is the cache for PointerTo.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
Back to top