Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 89 for elts (0.16 sec)

  1. pilot/test/mock/config.go

    	// update all elements
    	for i := 0; i < n; i++ {
    		elt := Make(namespace, i)
    		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) {
    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. 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)
  3. 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)
  4. 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)
  5. src/cmd/compile/internal/typecheck/typecheck.go

    		var kv *ir.KeyExpr
    		if elt.Op() == ir.OKEY {
    			elt := elt.(*ir.KeyExpr)
    			elt.Key = Expr(elt.Key)
    			key = IndexConst(elt.Key)
    			if key < 0 {
    				base.Fatalf("invalid index: %v", elt.Key)
    			}
    			kv = elt
    			r = elt.Value
    		}
    
    		r = Expr(r)
    		r = AssignConv(r, elemType, ctx)
    		if kv != nil {
    			kv.Value = r
    		} else {
    			elts[i] = r
    		}
    
    		if key >= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  6. 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)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    			}
    		}
    	}
    }
    
    // checkCopyLocksCompositeLit detects lock copy inside a composite literal
    func checkCopyLocksCompositeLit(pass *analysis.Pass, cl *ast.CompositeLit) {
    	for _, x := range cl.Elts {
    		if node, ok := x.(*ast.KeyValueExpr); ok {
    			x = node.Value
    		}
    		if path := lockPathRhs(pass, x); path != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  8. src/cmd/cgo/ast.go

    		}
    	case *ast.BadExpr:
    	case *ast.Ident:
    	case *ast.Ellipsis:
    		f.walk(&n.Elt, ctxType, visit)
    	case *ast.BasicLit:
    	case *ast.FuncLit:
    		f.walk(n.Type, ctxType, visit)
    		f.walk(n.Body, ctxStmt, visit)
    	case *ast.CompositeLit:
    		f.walk(&n.Type, ctxType, visit)
    		f.walk(n.Elts, ctxExpr, visit)
    	case *ast.ParenExpr:
    		f.walk(&n.X, context, visit)
    	case *ast.SelectorExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    	case *ast.BadExpr, *ast.Ident, *ast.BasicLit:
    		// nothing to do
    
    	case *ast.Ellipsis:
    		a.apply(n, "Elt", nil, n.Elt)
    
    	case *ast.FuncLit:
    		a.apply(n, "Type", nil, n.Type)
    		a.apply(n, "Body", nil, n.Body)
    
    	case *ast.CompositeLit:
    		a.apply(n, "Type", nil, n.Type)
    		a.applyList(n, "Elts")
    
    	case *ast.ParenExpr:
    		a.apply(n, "X", nil, n.X)
    
    	case *ast.SelectorExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  10. src/go/ast/ast.go

    	CompositeLit struct {
    		Type       Expr      // literal type; or nil
    		Lbrace     token.Pos // position of "{"
    		Elts       []Expr    // list of composite elements; or nil
    		Rbrace     token.Pos // position of "}"
    		Incomplete bool      // true if (source) expressions are missing in the Elts list
    	}
    
    	// A ParenExpr node represents a parenthesized expression.
    	ParenExpr struct {
    		Lparen token.Pos // position of "("
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
Back to top