summaryrefslogtreecommitdiff
path: root/src/pkg/go/doc/reader.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/go/doc/reader.go')
-rw-r--r--src/pkg/go/doc/reader.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pkg/go/doc/reader.go b/src/pkg/go/doc/reader.go
index bdfb294ad..3558892eb 100644
--- a/src/pkg/go/doc/reader.go
+++ b/src/pkg/go/doc/reader.go
@@ -439,8 +439,10 @@ func (r *reader) readFile(src *ast.File) {
// gets to (re-)use the declaration documentation
// if there's none associated with the spec itself
fake := &ast.GenDecl{
- d.Doc, d.Pos(), token.TYPE, token.NoPos,
- []ast.Spec{s}, token.NoPos,
+ Doc: d.Doc,
+ TokPos: d.Pos(),
+ Tok: token.TYPE,
+ Specs: []ast.Spec{s},
}
r.readType(fake, s)
}
@@ -460,7 +462,7 @@ func (r *reader) readFile(src *ast.File) {
// non-empty BUG comment; collect comment without BUG prefix
list := append([]*ast.Comment(nil), c.List...) // make a copy
list[0].Text = text[m[1]:]
- r.bugs = append(r.bugs, (&ast.CommentGroup{list}).Text())
+ r.bugs = append(r.bugs, (&ast.CommentGroup{List: list}).Text())
}
}
}
@@ -530,7 +532,7 @@ func customizeRecv(f *Func, recvTypeName string, embeddedIsPtr bool, level int)
_, origRecvIsPtr := newField.Type.(*ast.StarExpr)
var typ ast.Expr = ast.NewIdent(recvTypeName)
if !embeddedIsPtr && origRecvIsPtr {
- typ = &ast.StarExpr{token.NoPos, typ}
+ typ = &ast.StarExpr{X: typ}
}
newField.Type = typ