- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 247 for elts (0.09 sec)
-
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) -
src/cmd/fix/printerconfig.go
return } if ss := se.Sel.String(); ss == "Config" { for i, e := range cl.Elts { if _, ok := e.(*ast.KeyValueExpr); ok { break } switch i { case 0: cl.Elts[i] = &ast.KeyValueExpr{ Key: ast.NewIdent("Mode"), Value: e, } case 1: cl.Elts[i] = &ast.KeyValueExpr{ Key: ast.NewIdent("Tabwidth"), Value: e, } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 1.1K bytes - Viewed (0) -
src/cmd/fix/netipv6zone.go
case "IPAddr", "UDPAddr", "TCPAddr": for i, e := range cl.Elts { if _, ok := e.(*ast.KeyValueExpr); ok { break } switch i { case 0: cl.Elts[i] = &ast.KeyValueExpr{ Key: ast.NewIdent("IP"), Value: e, } case 1: if elit, ok := e.(*ast.BasicLit); ok && elit.Value == "0" { cl.Elts = append(cl.Elts[:i], cl.Elts[i+1:]...) } else { cl.Elts[i] = &ast.KeyValueExpr{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 1.3K bytes - Viewed (0) -
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) -
src/cmd/gofmt/gofmt_test.go
*rewriteRule = "" info, err := os.Lstat(in) if err != nil { t.Error(err) return } for _, flag := range strings.Split(gofmtFlags(in, 20), " ") { elts := strings.SplitN(flag, "=", 2) name := elts[0] value := "" if len(elts) == 2 { value = elts[1] } switch name { case "": // no flags case "-r": *rewriteRule = value case "-s": *simplifyAST = true case "-stdin":
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 10 19:22:49 UTC 2022 - 4.3K bytes - Viewed (0) -
src/go/doc/exports.go
j++ } } return list[0:j] } var underscore = ast.NewIdent("_") func filterCompositeLit(lit *ast.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 []ast.Expr, filter Filter, export bool) []ast.Expr { j := 0 for _, exp := range list {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 01 18:18:07 UTC 2022 - 8.5K bytes - Viewed (0) -
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) -
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) -
src/cmd/gofmt/simplify.go
switch typ := outer.Type.(type) { case *ast.ArrayType: eltType = typ.Elt case *ast.MapType: keyType = typ.Key eltType = typ.Value } if eltType != nil { var ktyp reflect.Value if keyType != nil { ktyp = reflect.ValueOf(keyType) } typ := reflect.ValueOf(eltType) for i, x := range outer.Elts { px := &outer.Elts[i] // look at value of indexed/named elements
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 19 20:06:14 UTC 2022 - 4.8K bytes - Viewed (0) -
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)