- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 387 for typeOf (0.26 sec)
-
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) -
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) -
platforms/core-configuration/declarative-dsl-core/src/main/kotlin/org/gradle/internal/declarativedsl/schemaBuilder/FunctionExtractor.kt
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu May 16 11:58:18 UTC 2024 - 13.7K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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) -
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) -
pkg/controlplane/instance_test.go
} g := 0 // generic index for k := range kube { kt := reflect.TypeOf(kube[k]) var gt reflect.Type if g < len(generic) { gt = reflect.TypeOf(generic[g]) } // special case: we identify full core and generic core if kt.Kind() == reflect.Ptr && kt.Elem().PkgPath() == reflect.TypeOf(corerest.Config{}).PkgPath() { kt = reflect.TypeOf(&corerest.GenericConfig{}) } if kt == gt { g++
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jun 03 11:50:04 UTC 2024 - 21.5K bytes - Viewed (0)