Skip to content

Commit

Permalink
go/doc: use go/doc/comment
Browse files Browse the repository at this point in the history
[This CL is part of a sequence implementing the proposal #51082.
The design doc is at https://go.dev/s/godocfmt-design.]

Use go/doc/comment to implement the existing go/doc comment APIs,
as well as adding new APIs more tailored to the new world.

For #51082.

Change-Id: I05b97ecedbf7cf7b8dede7ace6736ed6d89204a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/384265
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
  • Loading branch information
rsc committed Apr 11, 2022
1 parent 8b4ded3 commit 27b7b1f
Show file tree
Hide file tree
Showing 10 changed files with 390 additions and 795 deletions.
6 changes: 6 additions & 0 deletions api/next/51082.txt
@@ -1,3 +1,9 @@
pkg go/doc, method (*Package) HTML(string) []uint8 #51082
pkg go/doc, method (*Package) Markdown(string) []uint8 #51082
pkg go/doc, method (*Package) Parser() *comment.Parser #51082
pkg go/doc, method (*Package) Printer() *comment.Printer #51082
pkg go/doc, method (*Package) Synopsis(string) string #51082
pkg go/doc, method (*Package) Text(string) []uint8 #51082
pkg go/doc/comment, func DefaultLookupPackage(string) (string, bool) #51082
pkg go/doc/comment, method (*DocLink) DefaultURL(string) string #51082
pkg go/doc/comment, method (*Heading) DefaultID() string #51082
Expand Down
2 changes: 1 addition & 1 deletion src/go/build/deps_test.go
Expand Up @@ -294,7 +294,7 @@ var depsRules = `
< go/printer
< go/format;
go/parser, internal/lazyregexp, text/template
go/doc/comment, go/parser, internal/lazyregexp, text/template
< go/doc;
math/big, go/token
Expand Down

0 comments on commit 27b7b1f

Please sign in to comment.