Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 250 for elem3 (0.06 sec)

  1. test/typeparam/mapsimp.dir/a.go

    // elements equal. All floating point NaNs are considered equal.
    func SliceEqual[Elem comparable](s1, s2 []Elem) bool {
    	if len(s1) != len(s2) {
    		return false
    	}
    	for i, v1 := range s1 {
    		v2 := s2[i]
    		if v1 != v2 {
    			isNaN := func(f Elem) bool { return f != f }
    			if !isNaN(v1) || !isNaN(v2) {
    				return false
    			}
    		}
    	}
    	return true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 24 22:17:33 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/apitesting/naming/naming.go

    	"k8s.io/apimachinery/pkg/runtime/schema"
    	"k8s.io/apimachinery/pkg/util/errors"
    	"k8s.io/apimachinery/pkg/util/sets"
    )
    
    var (
    	marshalerType   = reflect.TypeOf((*json.Marshaler)(nil)).Elem()
    	unmarshalerType = reflect.TypeOf((*json.Unmarshaler)(nil)).Elem()
    )
    
    // VerifyGroupNames ensures that all groups in the scheme ends with the k8s.io suffix.
    // Exceptions can be tolerated using the legacyUnsuffixedGroups parameter
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 27 07:07:03 UTC 2022
    - 5.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/syntax/walk.go

    	case *ListExpr:
    		w.exprList(n.ElemList)
    
    	// types
    	case *ArrayType:
    		if n.Len != nil {
    			w.node(n.Len)
    		}
    		w.node(n.Elem)
    
    	case *SliceType:
    		w.node(n.Elem)
    
    	case *DotsType:
    		w.node(n.Elem)
    
    	case *StructType:
    		w.fieldList(n.FieldList)
    		for _, t := range n.TagList {
    			if t != nil {
    				w.node(t)
    			}
    		}
    
    	case *Field:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:55:04 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/strategicpatch/meta.go

    	// If the underlying element is either an array or a slice, return its element type.
    	case reflect.Pointer:
    		t = t.Elem()
    		if t.Kind() == reflect.Array || t.Kind() == reflect.Slice {
    			t = t.Elem()
    		}
    		elemType = t
    	default:
    		return nil, PatchMeta{}, fmt.Errorf("expected slice or array type, but got: %s", s.T.Kind().String())
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 16:45:45 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/sync/semaphore/semaphore.go

    	w := waiter{n: n, ready: ready}
    	elem := s.waiters.PushBack(w)
    	s.mu.Unlock()
    
    	select {
    	case <-done:
    		s.mu.Lock()
    		select {
    		case <-ready:
    			// Acquired the semaphore after we were canceled.
    			// Pretend we didn't and put the tokens back.
    			s.cur -= n
    			s.notifyWaiters()
    		default:
    			isFront := s.waiters.Front() == elem
    			s.waiters.Remove(elem)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  6. src/internal/buildcfg/exp.go

    // regardless of base.
    func expList(exp, base *goexperiment.Flags, all bool) []string {
    	var list []string
    	rv := reflect.ValueOf(exp).Elem()
    	var rBase reflect.Value
    	if base != nil {
    		rBase = reflect.ValueOf(base).Elem()
    	}
    	rt := rv.Type()
    	for i := 0; i < rt.NumField(); i++ {
    		name := strings.ToLower(rt.Field(i).Name)
    		val := rv.Field(i).Bool()
    		baseVal := false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:38:52 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  7. pkg/test/prow/util.go

    	}
    	return join(artifactsBase, "logs", jobName, buildID, name)
    }
    
    func join(base string, elem ...string) string {
    	res, _ := url.JoinPath(base, elem...)
    	return res
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/cel/types_test.go

    		t.Errorf("got %s, wanted list", list.TypeName())
    	}
    	if list.DefaultValue() == nil {
    		t.Error("got nil zero value for list type")
    	}
    	if list.ElemType.TypeName() != "string" {
    		t.Errorf("got %s, wanted elem type of string", list.ElemType.TypeName())
    	}
    	expT, err := list.ExprType()
    	if err != nil {
    		t.Errorf("fail to get cel type: %s", err)
    	}
    	if expT.GetListType() == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 10 22:05:55 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  9. src/reflect/example_test.go

    	makeSwap := func(fptr any) {
    		// fptr is a pointer to a function.
    		// Obtain the function value itself (likely nil) as a reflect.Value
    		// so that we can query its type and then set the value.
    		fn := reflect.ValueOf(fptr).Elem()
    
    		// Make a function of the right type.
    		v := reflect.MakeFunc(fn.Type(), swap)
    
    		// Assign it to the value fn represents.
    		fn.Set(v)
    	}
    
    	// Make and call a swap function for ints.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 19 20:04:36 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/buildtag/buildtag.go

    	for _, arg := range fields[1:] {
    		for _, elem := range strings.Split(arg, ",") {
    			if strings.HasPrefix(elem, "!!") {
    				check.pass.Reportf(pos, "invalid double negative in build constraint: %s", arg)
    				check.crossCheck = false
    				continue
    			}
    			elem = strings.TrimPrefix(elem, "!")
    			for _, c := range elem {
    				if !unicode.IsLetter(c) && !unicode.IsDigit(c) && c != '_' && c != '.' {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 9.3K bytes
    - Viewed (0)
Back to top