diff --git a/doc/walker.go b/doc/walker.go index 9b652c54c..95ecb5aa9 100644 --- a/doc/walker.go +++ b/doc/walker.go @@ -154,6 +154,9 @@ func (w *walker) build(srcs []*source, nod *Node) ([]string, error) { pdoc := doc.New(apkg, w.ImportPath, mode) nod.Synopsis = Synopsis(pdoc.Doc) + if i := strings.Index(nod.Synopsis, "\n"); i > -1 { + nod.Synopsis = nod.Synopsis[:i] + } return imports, err }