mirror of
https://github.com/golang/go
synced 2024-11-20 02:04:39 -07:00
text/template/parse: restore pointer-only receivers for Type on Dot and Nil
Needless except that the api tool complains. We could fix that issue instead. TBR=bradfitz R=golang-codereviews CC=golang-codereviews https://golang.org/cl/133290043
This commit is contained in:
parent
1d0c89a454
commit
7dc2b3cbd1
@ -360,6 +360,13 @@ func (t *Tree) newDot(pos Pos) *DotNode {
|
|||||||
return &DotNode{tr: t, NodeType: NodeDot, Pos: pos}
|
return &DotNode{tr: t, NodeType: NodeDot, Pos: pos}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (d *DotNode) Type() NodeType {
|
||||||
|
// Override method on embedded NodeType for API compatibility.
|
||||||
|
// TODO: Not really a problem; could change API without effect but
|
||||||
|
// api tool complains.
|
||||||
|
return NodeDot
|
||||||
|
}
|
||||||
|
|
||||||
func (d *DotNode) String() string {
|
func (d *DotNode) String() string {
|
||||||
return "."
|
return "."
|
||||||
}
|
}
|
||||||
@ -383,6 +390,13 @@ func (t *Tree) newNil(pos Pos) *NilNode {
|
|||||||
return &NilNode{tr: t, NodeType: NodeNil, Pos: pos}
|
return &NilNode{tr: t, NodeType: NodeNil, Pos: pos}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (n *NilNode) Type() NodeType {
|
||||||
|
// Override method on embedded NodeType for API compatibility.
|
||||||
|
// TODO: Not really a problem; could change API without effect but
|
||||||
|
// api tool complains.
|
||||||
|
return NodeNil
|
||||||
|
}
|
||||||
|
|
||||||
func (n *NilNode) String() string {
|
func (n *NilNode) String() string {
|
||||||
return "nil"
|
return "nil"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user