Search Options

Results per page
Sort
Preferred Languages
Advance

Results 171 - 180 of 591 for elem5 (0.07 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. src/cmd/compile/internal/walk/assign.go

    		return mkcall1(chanfn("chanrecv1", 2, r.Type()), nil, init, r, n1)
    
    	case ir.OAPPEND:
    		// x = append(...)
    		call := as.Y.(*ir.CallExpr)
    		if call.Type().Elem().NotInHeap() {
    			base.Errorf("%v can't be allocated in Go; it is incomplete (or unallocatable)", call.Type().Elem())
    		}
    		var r ir.Node
    		switch {
    		case isAppendOfMake(call):
    			// x = append(y, make([]T, y)...)
    			r = extendSlice(call, init)
    		case call.IsDDD:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. src/go/types/predicates.go

    			// assume they are the same to avoid spurious follow-on errors.
    			return (x.len < 0 || y.len < 0 || x.len == y.len) && c.identical(x.elem, y.elem, p)
    		}
    
    	case *Slice:
    		// Two slice types are identical if they have identical element types.
    		if y, ok := y.(*Slice); ok {
    			return c.identical(x.elem, y.elem, p)
    		}
    
    	case *Struct:
    		// Two struct types are identical if they have the same sequence of fields,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  10. src/net/url/url_test.go

    			base: "https://go.googlesource.com/a/b",
    			elem: []string{"/go"},
    			out:  "https://go.googlesource.com/a/b/go",
    		},
    		{
    			base: "/",
    			elem: nil,
    			out:  "/",
    		},
    		{
    			base: "a",
    			elem: nil,
    			out:  "a",
    		},
    		{
    			base: "a",
    			elem: []string{"b"},
    			out:  "a/b",
    		},
    		{
    			base: "a",
    			elem: []string{"../b"},
    			out:  "b",
    		},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:52:38 UTC 2024
    - 52.1K bytes
    - Viewed (0)
Back to top