Standard library / text/template/parse

text/template/parse.Pos

Byte position in original template source, not a rune count. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
type Pos int

Working Example

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