Golang go/ast.Ident.Pos() and End() functions example

package go/ast

Golang go/ast.Ident.Pos() and End() functions usage example

 func (pkg *Package) growSpan(ident *ast.Ident, obj types.Object) {
 if *strictShadowing {
 return // No need
 }
 pos := ident.Pos()
 end := ident.End()
 ...
 }

Reference :

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

Advertisement