Unfortunately, most people agree that the ast package is a mess. It isn't used by the actual compiler. There is some talk of eventually deprecating it and publishing the internal ast/parser/type-checker packages.
I think calling it a "mess" is hyperbole, but yes, it's true that it has shortcomings and may be deprecated and replaced.
Re:From AST to Lossless Syntax Tree
by placeybordeaux on Monday February 13, 2017 @12:55AM
(#13633413)
I've used it before for a tool that transforms code that throws away an error code to code that takes the error code and panics if not nil.
https://github.com/placeybordeaux/panic-attack
The package works fine, but I can't say it was fun to work with.
[1] https://golang.org/pkg/go/ast/