Golang go/ast.ArrayType.End() function and Pos() function example

package go/ast

Golang go/ast.ArrayType.End() function and Pos() function usage example

 var n ast.Node

 switch n := n.(type) {
 case *ast.ArrayType:
 fmt.Println("End position ", n.End())
 fmt.Println("Position ", n.Pos())
 }

Reference :

http://golang.org/pkg/go/ast/#ArrayType.End

http://golang.org/pkg/go/ast/#ArrayType.Pos

Advertisement