Standard library / text/template/parse

text/template/parse.Pos.Position()

Returns the position itself; commonly promoted by embedding. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func (p Pos) Position() Pos

Return Value

Pos

Returns the position itself; commonly promoted by embedding.

Working Example

Example Snippetgo
package main
import (  "fmt"  "text/template/parse")
func main() { fmt.Println(parse.Pos(7).Position() == 7) }
Go Reference