- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 46 for elts (0.09 sec)
-
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/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) -
src/go/ast/walk.go
// Expressions case *BadExpr, *Ident, *BasicLit: // nothing to do case *Ellipsis: if n.Elt != nil { Walk(v, n.Elt) } case *FuncLit: Walk(v, n.Type) Walk(v, n.Body) case *CompositeLit: if n.Type != nil { Walk(v, n.Type) } walkList(v, n.Elts) case *ParenExpr: Walk(v, n.X) case *SelectorExpr: Walk(v, n.X) Walk(v, n.Sel)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:34:10 UTC 2024 - 6.4K 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/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/crypto/tls/handshake_messages.go
exts.AddUint8LengthPrefixed(func(exts *cryptobyte.Builder) { exts.AddBytes([]byte(m.alpnProtocol)) }) }) }) } if len(m.scts) > 0 { exts.AddUint16(extensionSCT) exts.AddUint16LengthPrefixed(func(exts *cryptobyte.Builder) { exts.AddUint16LengthPrefixed(func(exts *cryptobyte.Builder) { for _, sct := range m.scts { exts.AddUint16LengthPrefixed(func(exts *cryptobyte.Builder) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 51.8K bytes - Viewed (0) -
src/mime/type.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/watch/watch.go
} // Stop implements Interface func (w emptyWatch) Stop() { } // ResultChan implements Interface func (w emptyWatch) ResultChan() <-chan Event { return chan Event(w) } // FakeWatcher lets you test anything that consumes a watch.Interface; threadsafe. type FakeWatcher struct { result chan Event stopped bool sync.Mutex } func NewFake() *FakeWatcher { return &FakeWatcher{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 20:06:22 UTC 2024 - 8.1K bytes - Viewed (1) -
src/net/http/fs_test.go
if !f.fi.dir { return nil, fs.ErrInvalid } var fis []fs.FileInfo limit := f.entpos + count if count <= 0 || limit > len(f.fi.ents) { limit = len(f.fi.ents) } for ; f.entpos < limit; f.entpos++ { fis = append(fis, f.fi.ents[f.entpos]) } if len(fis) == 0 && count > 0 { return fis, io.EOF } else { return fis, nil } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 23:39:44 UTC 2024 - 49.9K bytes - Viewed (0) -
pkg/scheduler/scheduler_test.go
fwk, err := newFramework(ctx, registry, profile) if err != nil { t.Fatal(err) } exts := fwk.EnqueueExtensions() // need to sort to make the test result stable. sort.Slice(exts, func(i, j int) bool { return exts[i].Name() < exts[j].Name() }) got := buildQueueingHintMap(exts) for e, fns := range got { wantfns, ok := tt.want[e] if !ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 17 09:07:27 UTC 2024 - 42K bytes - Viewed (0)