Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 3,055 for REFLECT (0.11 sec)

  1. callbacks/helper.go

    		}
    		return
    	}
    }
    
    type visitMap = map[reflect.Value]bool
    
    // Check if circular values, return true if loaded
    func loadOrStoreVisitMap(visitMap *visitMap, v reflect.Value) (loaded bool) {
    	if v.Kind() == reflect.Ptr {
    		v = v.Elem()
    	}
    
    	switch v.Kind() {
    	case reflect.Slice, reflect.Array:
    		loaded = true
    		for i := 0; i < v.Len(); i++ {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Apr 14 12:32:57 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  2. pkg/kubelet/eviction/mock_threshold_notifier_test.go

    //
    
    // Package eviction is a generated GoMock package.
    package eviction
    
    import (
    	context "context"
    	reflect "reflect"
    	time "time"
    
    	gomock "go.uber.org/mock/gomock"
    	v1alpha1 "k8s.io/kubelet/pkg/apis/stats/v1alpha1"
    )
    
    // MockManager is a mock of Manager interface.
    type MockManager struct {
    	ctrl     *gomock.Controller
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  3. operator/pkg/util/reflect_test.go

    			okValues: []any{testInt, &testInt},
    		},
    	}
    
    	for _, tt := range tests {
    		for vidx, v := range allValues {
    			if got, want := tt.function(reflect.ValueOf(v)), isInListOfInterface(tt.okValues, v); got != want {
    				t.Errorf("%s with %s (#%d): got: %t, want: %t", tt.desc, reflect.TypeOf(v), vidx, got, want)
    			}
    		}
    	}
    }
    
    func TestValuesAreSameType(t *testing.T) {
    	type EnumType int64
    
    	tests := []struct {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 10.2K bytes
    - Viewed (0)
  4. test/reflectmethod6.go

    // license that can be found in the LICENSE file.
    
    // Similar to reflectmethod5.go, but for reflect.Type.MethodByName.
    
    package main
    
    import "reflect"
    
    var called bool
    
    type foo struct{}
    
    func (foo) X() { called = true }
    
    var h = reflect.Type.MethodByName
    
    func main() {
    	v := reflect.ValueOf(foo{})
    	m, ok := h(v.Type(), "X")
    	if !ok {
    		panic("FAIL")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 19 03:12:32 UTC 2020
    - 555 bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testplugin/testdata/issue18584/plugin.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"
    
    type C struct {
    }
    
    func F(c *C) *C {
    	return nil
    }
    
    func G() bool {
    	var c *C
    	return reflect.TypeOf(F).Out(0) == reflect.TypeOf(c)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 326 bytes
    - Viewed (0)
  6. pkg/kubelet/cadvisor/testing/cadvisor_mock.go

    // Generated by this command:
    //
    //	mockgen -source=types.go -destination=testing/cadvisor_mock.go -package=testing Interface
    //
    
    // Package testing is a generated GoMock package.
    package testing
    
    import (
    	reflect "reflect"
    
    	v1 "github.com/google/cadvisor/info/v1"
    	v2 "github.com/google/cadvisor/info/v2"
    	gomock "go.uber.org/mock/gomock"
    )
    
    // MockInterface is a mock of Interface interface.
    type MockInterface struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  7. pkg/kubelet/apis/podresources/testing/provider_mock.go

    //
    
    // Package testing is a generated GoMock package.
    package testing
    
    import (
    	reflect "reflect"
    
    	gomock "go.uber.org/mock/gomock"
    	v1 "k8s.io/api/core/v1"
    	v10 "k8s.io/kubelet/pkg/apis/podresources/v1"
    )
    
    // MockDevicesProvider is a mock of DevicesProvider interface.
    type MockDevicesProvider struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  8. pkg/proxy/util/localdetector_test.go

    		}
    
    		ifLocal := localDetector.IfLocal()
    		ifNotLocal := localDetector.IfNotLocal()
    
    		if !reflect.DeepEqual(ifLocal, c.expectedIfLocalOutput) {
    			t.Errorf("IfLocal, expected: '%v', but got: '%v'", c.expectedIfLocalOutput, ifLocal)
    		}
    
    		if !reflect.DeepEqual(ifNotLocal, c.expectedIfNotLocalOutput) {
    			t.Errorf("IfNotLocal, expected: '%v', but got: '%v'", c.expectedIfNotLocalOutput, ifNotLocal)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 15:34:37 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  9. pkg/util/slice/slice_test.go

    limitations under the License.
    */
    
    package slice
    
    import (
    	"reflect"
    	"testing"
    )
    
    func TestCopyStrings(t *testing.T) {
    	var src1 []string
    	dest1 := CopyStrings(src1)
    
    	if !reflect.DeepEqual(src1, dest1) {
    		t.Errorf("%v and %v are not equal", src1, dest1)
    	}
    
    	src2 := []string{}
    	dest2 := CopyStrings(src2)
    
    	if !reflect.DeepEqual(src2, dest2) {
    		t.Errorf("%v and %v are not equal", src2, dest2)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 30 07:21:37 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  10. platforms/core-configuration/declarative-dsl-core/src/main/kotlin/org/gradle/internal/declarativedsl/mappingToJvm/RuntimePropertyResolver.kt

    import org.gradle.internal.declarativedsl.mappingToJvm.RuntimePropertyResolver.WriteResolution.UnresolvedWrite
    import java.lang.reflect.Modifier
    import kotlin.reflect.KClass
    import kotlin.reflect.KMutableProperty
    import kotlin.reflect.KProperty
    import kotlin.reflect.KVisibility
    import kotlin.reflect.full.memberFunctions
    import kotlin.reflect.full.memberProperties
    
    
    interface RuntimePropertyResolver {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Mar 25 17:34:03 UTC 2024
    - 5.7K bytes
    - Viewed (0)
Back to top