- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 50 for Decl (0.05 sec)
-
src/cmd/compile/internal/noder/noder.go
renameinitgen++ return s } func checkEmbed(decl *syntax.VarDecl, haveEmbed, withinFunc bool) error { switch { case !haveEmbed: return errors.New("go:embed only allowed in Go files that import \"embed\"") case len(decl.NameList) > 1: return errors.New("go:embed cannot apply to multiple vars") case decl.Values != nil: return errors.New("go:embed cannot apply to var with initializer")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 11 20:40:57 UTC 2023 - 12.5K bytes - Viewed (0) -
src/text/template/parse/node.go
IsAssign bool // The variables are being assigned, not declared. Decl []*VariableNode // Variables in lexical order. Cmds []*CommandNode // The commands in lexical order. } func (t *Tree) newPipeline(pos Pos, line int, vars []*VariableNode) *PipeNode { return &PipeNode{tr: t, NodeType: NodePipe, Pos: pos, Line: line, Decl: vars} } func (p *PipeNode) append(command *CommandNode) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:57:51 UTC 2024 - 24.2K bytes - Viewed (0) -
src/text/template/parse/parse.go
pipe.IsAssign = next.typ == itemAssign t.nextNonSpace() pipe.Decl = append(pipe.Decl, t.newVariable(v.pos, v.val)) t.vars = append(t.vars, v.val) case next.typ == itemChar && next.val == ",": t.nextNonSpace() pipe.Decl = append(pipe.Decl, t.newVariable(v.pos, v.val)) t.vars = append(t.vars, v.val) if context == "range" && len(pipe.Decl) < 2 { switch t.peekNonSpace().typ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:57:51 UTC 2024 - 21.3K bytes - Viewed (0) -
src/go/ast/ast.go
type Expr interface { Node exprNode() } // All statement nodes implement the Stmt interface. type Stmt interface { Node stmtNode() } // All declaration nodes implement the Decl interface. type Decl interface { Node declNode() } // ---------------------------------------------------------------------------- // Comments // A Comment node represents a single //-style or /*-style comment. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 35.6K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/model/schemas_test.go
ExpectedMaxElements: 20, }, } for _, testCase := range tests { t.Run(testCase.Name, func(t *testing.T) { decl := SchemaDeclType(testCase.InputSchema, false) if decl.MaxElements != testCase.ExpectedMaxElements { t.Errorf("wrong maxElements (got %d, expected %d)", decl.MaxElements, testCase.ExpectedMaxElements) } }) } } func maxPtr(max int64) *int64 { return &max }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 16 20:13:14 UTC 2024 - 14K bytes - Viewed (0) -
src/go/doc/doc.go
type Value struct { Doc string Names []string // var or const names in declaration order Decl *ast.GenDecl order int } // Type is the documentation for a type declaration. type Type struct { Doc string Name string Decl *ast.GenDecl // associated declarations Consts []*Value // sorted list of constants of (mostly) this type
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 11.2K bytes - Viewed (0) -
src/text/template/exec.go
mark := s.mark() oneIteration := func(index, elem reflect.Value) { if len(r.Pipe.Decl) > 0 { if r.Pipe.IsAssign { // With two variables, index comes first. // With one, we use the element. if len(r.Pipe.Decl) > 1 { s.setVar(r.Pipe.Decl[0].Ident[0], index) } else { s.setVar(r.Pipe.Decl[0].Ident[0], elem) } } else { // Set top var (lexically the second if there
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 21:22:24 UTC 2024 - 32K bytes - Viewed (0) -
src/cmd/compile/internal/types2/resolver.go
var last *syntax.ConstDecl // last ConstDecl with init expressions, or nil for index, decl := range file.DeclList { if _, ok := decl.(*syntax.ConstDecl); !ok { first = -1 // we're not in a constant declaration } switch s := decl.(type) { case *syntax.ImportDecl: // import package if s.Path == nil || s.Path.Bad {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 26.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go
// If the next-to-last argument is a string, then this may be a Printf wrapper. // Otherwise it may be a Print wrapper. func maybePrintfWrapper(info *types.Info, decl ast.Decl) *printfWrapper { // Look for functions with final argument type ...interface{}. fdecl, ok := decl.(*ast.FuncDecl) if !ok || fdecl.Body == nil { return nil } fn, ok := info.Defs[fdecl.Name].(*types.Func) // Type information may be incomplete.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 32.5K bytes - Viewed (0) -
src/net/http/clientserver_test.go
func testTrailersClientToServer(t *testing.T, mode testMode) { cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) { var decl []string for k := range r.Trailer { decl = append(decl, k) } slices.Sort(decl) slurp, err := io.ReadAll(r.Body) if err != nil { t.Errorf("Server reading request body: %v", err) } if string(slurp) != "foo" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 46.6K bytes - Viewed (0)