type go/ast.Spec
30 uses
go/ast (current package)
ast.go#L892: Spec interface {
ast.go#L989: Specs []Spec
commentmap.go#L218: case *File, *Field, Decl, Spec, Stmt:
filter.go#L182: func filterSpec(spec Spec, f Filter, export bool) bool {
filter.go#L212: func filterSpecList(list []Spec, f Filter, export bool) []Spec {
import.go#L70: func importPath(s Spec) string {
import.go#L78: func importName(s Spec) string {
import.go#L86: func importComment(s Spec) string {
import.go#L95: func collapse(prev, next Spec) bool {
import.go#L112: func sortSpecs(fset *token.FileSet, f *File, specs []Spec) []Spec {
import.go#L186: slices.SortFunc(specs, func(a, b Spec) int {
go/doc
example.go#L198: var namedImports []ast.Spec
example.go#L199: var blankImports []ast.Spec // _ imports
example.go#L437: var specs []ast.Spec
example.go#L493: func hasIota(s ast.Spec) bool {
exports.go#L209: func (r *reader) filterSpec(spec ast.Spec) bool {
exports.go#L269: func (r *reader) filterSpecList(list []ast.Spec, tok token.Token) []ast.Spec {
reader.go#L262: func specNames(specs []ast.Spec) []string {
reader.go#L634: Specs: []ast.Spec{s},
go/parser
parser.go#L2487: type parseSpecFunction func(doc *ast.CommentGroup, keyword token.Token, iota int) ast.Spec
parser.go#L2489: func (p *parser) parseImportSpec(doc *ast.CommentGroup, _ token.Token, _ int) ast.Spec {
parser.go#L2529: func (p *parser) parseValueSpec(doc *ast.CommentGroup, keyword token.Token, iota int) ast.Spec {
parser.go#L2588: func (p *parser) parseTypeSpec(doc *ast.CommentGroup, _ token.Token, _ int) ast.Spec {
parser.go#L2741: var list []ast.Spec
go/printer
nodes.go#L1575: func keepTypeColumn(specs []ast.Spec) []bool {
nodes.go#L1685: func (p *printer) spec(spec ast.Spec, n int, doIndent bool) {
printer.go#L1158: case ast.Spec: