Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 76 for elts (0.72 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. docs/pt/docs/tutorial/query-params.md

    http://127.0.0.1:8000/items/?skip=0&limit=10
    ```
    
    ...os parâmetros da consulta são:
    
    * `skip`: com o valor `0`
    * `limit`: com o valor `10`
    
    Como eles são parte da URL, eles são "naturalmente" strings.
    
    Mas quando você declara eles com os tipos do Python (no exemplo acima, como `int`), eles são convertidos para aquele tipo e validados em relação a ele.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  8. docs/pt/docs/tutorial/body-nested-models.md

    
    ```Python hl_lines="14"
    {!../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ## Tipo "set"
    
    
    Mas então, quando nós pensamos mais, percebemos que as tags não devem se repetir, elas provavelmente devem ser strings únicas.
    
    E que o Python tem um tipo de dados especial para conjuntos de itens únicos, o `set`.
    
    Então podemos importar `Set` e declarar `tags` como um `set` de `str`s:
    
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/first-steps.md

    Esta definição de *schema* inclui as rotas da sua API, os parâmetros possíveis que elas usam, etc.
    
    #### "*Schema*" de dados
    
    O termo "*schema*" também pode se referir à forma de alguns dados, como um conteúdo JSON.
    
    Nesse caso, significaria os atributos JSON e os tipos de dados que eles possuem, etc.
    
    #### OpenAPI e JSON *Schema*
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  10. src/mime/type.go

    	mimeTypesLower.Store(extLower, mimeType)
    
    	extensionsMu.Lock()
    	defer extensionsMu.Unlock()
    	var exts []string
    	if ei, ok := extensions.Load(justType); ok {
    		exts = ei.([]string)
    	}
    	for _, v := range exts {
    		if v == extLower {
    			return nil
    		}
    	}
    	extensions.Store(justType, append(exts, extLower))
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 5K bytes
    - Viewed (0)
Back to top