- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for Elts (0.03 sec)
-
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) -
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) -
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) -
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) -
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) -
src/go/printer/printer_test.go
panic(err) } // Replace the result with call(), which is on the next line. fd := file.Decls[0].(*ast.FuncDecl) ret := fd.Body.List[0].(*ast.ReturnStmt) ret.Results[0] = ret.Results[0].(*ast.CompositeLit).Elts[0] var buf bytes.Buffer if err := Fprint(&buf, fset, ret); err != nil { t.Fatal(err) } want := "return call()" if got := buf.String(); got != want { t.Fatalf("got %q, want %q", got, want) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 20.4K bytes - Viewed (0) -
src/cmd/doc/pkg.go
} return dotDotDot case *ast.FuncLit: return pkg.oneLineNodeDepth(n.Type, depth) + " { ... }" case *ast.CompositeLit: typ := pkg.oneLineNodeDepth(n.Type, depth) if len(n.Elts) == 0 { return fmt.Sprintf("%s{}", typ) } return fmt.Sprintf("%s{ %s }", typ, dotDotDot) case *ast.ArrayType: length := pkg.oneLineNodeDepth(n.Len, depth)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 08 20:15:52 UTC 2024 - 32K bytes - Viewed (0) -
pilot/pkg/networking/core/envoyfilter/cluster_patch_test.go
Value: buildPatchStruct(` {"transport_socket":{ "name":"transport_sockets.alts", "typed_config":{ "@type":"type.googleapis.com/udpa.type.v1.TypedStruct", "type_url": "type.googleapis.com/envoy.extensions.transport_sockets.alts.v3.Alts", "value":{"handshaker_service":"1.2.3.4"}}}}`), }, }, } sidecarOutboundIn := []*cluster.Cluster{
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Mar 28 17:09:02 UTC 2024 - 20.7K bytes - Viewed (0) -
platforms/jvm/jvm-services/src/test/groovy/org/gradle/internal/jvm/inspection/DefaultJvmMetadataDetectorTest.groovy
'os.arch': "x86_64", 'java.vm.name': "OpenJDK 64-Bit Server VM", 'java.vm.version': "11.0.8+10-LTS", 'java.vm.vendor': "Amazon.com Inc.", 'java.runtime.name': "OpenJDK Runtime Environment", 'java.runtime.version': "${version}.0.8+10-LTS" ] } private static Map<String, String> bellsoftJvm(String version) { ['java.home': "java-home",
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Mar 12 18:25:34 UTC 2024 - 22.9K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/RISCV64Ops.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 14:57:07 UTC 2024 - 30.7K bytes - Viewed (0)