Standard library / go/ast
go/ast.BadDecl.End()
Returns the stored To position of the malformed declaration. Expected stdout: '7\n'.
Formal Syntax & Structure
go syntaxgo
func (d *BadDecl) End() token.PosReturn Value
token.Pos
Returns the stored To position of the malformed declaration.
Working Example
Example Snippetgo
package main
import ( "fmt" "go/ast")
func main() { x := &ast.BadDecl{From: 3, To: 7}; fmt.Println(x.End()) }