Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for Elts (0.07 sec)

  1. pilot/test/mock/config.go

    		elt.Spec.(*config.MockConfig).Pairs[0].Value += "(updated)"
    		elt.ResourceVersion = revs[i]
    		elts[i] = elt
    		if _, err := r.Update(elt); err != nil {
    			t.Error(err)
    		}
    	}
    
    	// check that elements are stored
    	for i, elt := range elts {
    		v1 := r.Get(mockGvk, elts[i].Name, elts[i].Namespace)
    		if v1 == nil || !Compare(elt, *v1) {
    			t.Errorf("wanted %v, got %v", elt, v1)
    		}
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 13.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics/union_gauge.go

    */
    
    package metrics
    
    type unionGauge []Gauge
    
    var _ Gauge = unionGauge(nil)
    
    // NewUnionGauge constructs a Gauge that delegates to all of the given Gauges
    func NewUnionGauge(elts ...Gauge) Gauge {
    	return unionGauge(elts)
    }
    
    func (ug unionGauge) Set(x float64) {
    	for _, gauge := range ug {
    		gauge.Set(x)
    	}
    }
    
    func (ug unionGauge) Add(x float64) {
    	for _, gauge := range ug {
    		gauge.Add(x)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 03 17:37:20 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/composite/composite.go

    				continue
    			}
    
    			// check if the struct contains an unkeyed field
    			allKeyValue := true
    			var suggestedFixAvailable = len(cl.Elts) == strct.NumFields()
    			var missingKeys []analysis.TextEdit
    			for i, e := range cl.Elts {
    				if _, ok := e.(*ast.KeyValueExpr); !ok {
    					allKeyValue = false
    					if i >= strct.NumFields() {
    						break
    					}
    					field := strct.Field(i)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/index.go

    }
    
    // indexedElts checks the elements (elts) of an array or slice composite literal
    // against the literal's element type (typ), and the element indices against
    // the literal length if known (length >= 0). It returns the length of the
    // literal (maximum index value + 1).
    func (check *Checker) indexedElts(elts []syntax.Expr, typ Type, length int64) int64 {
    	visited := make(map[int64]bool, len(elts))
    	var index, max int64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 15 16:16:58 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  5. src/go/types/index.go

    }
    
    // indexedElts checks the elements (elts) of an array or slice composite literal
    // against the literal's element type (typ), and the element indices against
    // the literal length if known (length >= 0). It returns the length of the
    // literal (maximum index value + 1).
    func (check *Checker) indexedElts(elts []ast.Expr, typ Type, length int64) int64 {
    	visited := make(map[int64]bool, len(elts))
    	var index, max int64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  6. src/go/ast/filter.go

    		removedFields = true
    	}
    	fields.List = list[0:j]
    	return
    }
    
    func filterCompositeLit(lit *CompositeLit, filter Filter, export bool) {
    	n := len(lit.Elts)
    	lit.Elts = filterExprList(lit.Elts, filter, export)
    	if len(lit.Elts) < n {
    		lit.Incomplete = true
    	}
    }
    
    func filterExprList(list []Expr, filter Filter, export bool) []Expr {
    	j := 0
    	for _, exp := range list {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. src/go/types/expr.go

    				goto Error
    			}
    			if len(e.Elts) == 0 {
    				break
    			}
    			// Convention for error messages on invalid struct literals:
    			// we mention the struct type only if it clarifies the error
    			// (e.g., a duplicate field error doesn't need the struct type).
    			fields := utyp.fields
    			if _, ok := e.Elts[0].(*ast.KeyValueExpr); ok {
    				// all elements must have keys
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  8. src/go/types/exprstring.go

    	case *ast.FuncLit:
    		buf.WriteByte('(')
    		WriteExpr(buf, x.Type)
    		buf.WriteString(" literal)") // shortened
    
    	case *ast.CompositeLit:
    		WriteExpr(buf, x.Type)
    		buf.WriteByte('{')
    		if len(x.Elts) > 0 {
    			buf.WriteString("…")
    		}
    		buf.WriteByte('}')
    
    	case *ast.ParenExpr:
    		buf.WriteByte('(')
    		WriteExpr(buf, x.X)
    		buf.WriteByte(')')
    
    	case *ast.SelectorExpr:
    		WriteExpr(buf, x.X)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 19:31:44 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/typecheck.go

    	// If there are key/value pairs, create a map to keep seen
    	// keys so we can check for duplicate indices.
    	var indices map[int64]bool
    	for _, elt := range elts {
    		if elt.Op() == ir.OKEY {
    			indices = make(map[int64]bool)
    			break
    		}
    	}
    
    	var key, length int64
    	for i, elt := range elts {
    		ir.SetPos(elt)
    		r := elts[i]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  10. src/cmd/fix/typecheck.go

    					for _, e := range n.Elts {
    						if kv, ok := e.(*ast.KeyValueExpr); ok {
    							if typeof[kv.Key] == "" {
    								typeof[kv.Key] = kt
    							}
    							if typeof[kv.Value] == "" {
    								typeof[kv.Value] = vt
    							}
    						}
    					}
    				}
    			}
    			if typ := cfg.Type[t]; typ != nil && len(typ.Field) > 0 { // struct
    				for _, e := range n.Elts {
    					if kv, ok := e.(*ast.KeyValueExpr); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 16 22:02:42 UTC 2022
    - 20.1K bytes
    - Viewed (0)
Back to top