docs: adds package description to the stdlib Index

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba
2021-06-23 11:05:58 +02:00
parent 29ace62b72
commit af82c2c910
6 changed files with 34 additions and 27 deletions

View File

@@ -407,6 +407,7 @@ func walkStdlib(ctx context.Context, output, format string) {
// Generate index from sorted list of packages
sort.Strings(indexKeys)
for _, p := range indexKeys {
fmt.Fprintf(index, "- [%s](./%s)\n", p, getFileName(p))
description := mdEscape(packages[p].Description)
fmt.Fprintf(index, "- [%s](./%s) - %s\n", p, getFileName(p), description)
}
}