- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for VariableNode (0.39 sec)
-
src/text/template/parse/node.go
} // VariableNode holds a list of variable names, possibly with chained field // accesses. The dollar sign is part of the (first) name. type VariableNode struct { NodeType Pos tr *Tree Ident []string // Variable name and fields in lexical order. } func (t *Tree) newVariable(pos Pos, ident string) *VariableNode {
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/exec.go
case *parse.PipeNode: // Parenthesized pipeline. The arguments are all inside the pipeline; final must be absent. s.notAFunction(cmd.Args, final) return s.evalPipeline(dot, n) case *parse.VariableNode: return s.evalVariableNode(dot, n, cmd.Args, final) } s.at(firstWord) s.notAFunction(cmd.Args, final) switch word := firstWord.(type) { case *parse.BoolNode: return reflect.ValueOf(word.True)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 21:22:24 UTC 2024 - 32K bytes - Viewed (0) -
src/text/template/parse/parse_test.go
if err != nil { b.Fatal(err) } } } var sinkv, sinkl string func BenchmarkVariableString(b *testing.B) { v := &VariableNode{ Ident: []string{"$", "A", "BB", "CCC", "THIS_IS_THE_VARIABLE_BEING_PROCESSED"}, } b.ResetTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { sinkv = v.String() } if sinkv == "" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 24 21:59:12 UTC 2024 - 24K bytes - Viewed (0)