Skip to content
Permalink
Browse files
fix(internal/godocfx): add TOC element for module root package (#3599)
  • Loading branch information
tbpg committed Jan 22, 2021
1 parent ae96dcb commit 1d6eb238206fcf8815d88981527ef176851afd7a
Showing with 10 additions and 1 deletion.
  1. +8 −1 internal/godocfx/parse.go
  2. +2 −0 internal/godocfx/testdata/golden/toc.yml
@@ -339,9 +339,16 @@ func buildTOC(mod string, pis []pkgInfo, extraFiles []extraFile) tableOfContents
toc := tableOfContents{}

modTOC := &tocItem{
UID: mod, // Assume the module root has a package.
UID: mod,
Name: mod,
}

// Assume the module root has a package.
modTOC.addItem(&tocItem{
UID: mod,
Name: mod,
})

for _, ef := range extraFiles {
modTOC.addItem(&tocItem{
Href: ef.dstRelativePath,
@@ -2,5 +2,7 @@
- uid: cloud.google.com/go/storage
name: cloud.google.com/go/storage
items:
- uid: cloud.google.com/go/storage
name: cloud.google.com/go/storage
- name: README
href: pkg-readme.md

0 comments on commit 1d6eb23

Please sign in to comment.