Explain how to make changes to the project's static files and get them compiled
in to the godoc binary.
Change-Id: I12e0c50bf31925b3f211b6d0dd3e5f8cff547f32
Reviewed-on: https://go-review.googlesource.com/34925
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Previously a selection of text that spanned multiple lines would
include the line number as part of the orange highlight. This is
misleading (the line numbers aren't copied when you highlight the
text with your mouse) and a little ugly.
I had to move the tab character inside the <span class="ln"> block,
otherwise the orange highlight goes right up to the number, which is
off-putting and means the orange highlights don't line up vertically.
Before: https://monosnap.com/file/F9L166Zxxnf3ev74Z3JoJT0xz0nYLn.png
After: https://monosnap.com/file/6jfeFBG6tzhy3ZErqYWn6BfZ4fyk1R.pngFixesgolang/go#18561
Change-Id: I312d30ce01071850f8724246c54ce2d7259619d2
Reviewed-on: https://go-review.googlesource.com/34924
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The error was being written over by Execute.
Change-Id: Id5965542bf4d414043fdbe70ee3f2f790728c01d
Reviewed-on: https://go-review.googlesource.com/34954
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This change makes each release show only once on the whole page.
The current stable releases are not shown under the archive.
This change also fixes expandos to work correctly on IDs that are not
valid CSS selectors (i.e., "#go1.7.4") to ensure that the file listing
for a given version is expanded.
Updates golang/go#17574.
Change-Id: I7ff1041be3e0072286772ffa545a124764f81945
Reviewed-on: https://go-review.googlesource.com/34911
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Under "Stable Versions", only show the latest minor versions of the most two
recent major versions.
Under each of those versions, move the downloads for primary ports to
the top of the table and the other downloads under a separate
"Other Ports" heading.
Add a listing for every stable Go version under "All versions",
collapsed by default.
Fixesgolang/go#17574.
Updates golang/go#17018.
Change-Id: I7d74fef1b44a319a4bf65dedf24ffb27a7009f60
Reviewed-on: https://go-review.googlesource.com/34824
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Toggles can now be nested within one another. They can also be
referenced using an <a> element with the name attribute, rather than
an element with the "id" attribute.
Updates golang/go#17574.
Change-Id: I43c17499a6879e983a79a74e14c99128296288e1
Reviewed-on: https://go-review.googlesource.com/34825
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Specifically restricted to the "article" class, which is only used on
the blog.
Fixesgolang/go#18302.
Change-Id: I5988c3df70f0de93d77544edf091640b0c5df30c
Reviewed-on: https://go-review.googlesource.com/34828
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Adds instructions for "go get golang.org/x/build/version/..."
for the unstable version.
Fixesgolang/go#18337.
Change-Id: Iea5e8fab7f00a053e3b42ef355277307addb635b
Reviewed-on: https://go-review.googlesource.com/34823
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This partially reverts https://go-review.googlesource.com/#/c/33279/
(which moved doc strings above the declaration for all kinds of objects)
by moving the doc string for functions and methods below the signature
where they traditionally were.
Fixesgolang/go#18150.
Change-Id: Icbb9e7edcb3b34ad1d900acb3180217abdc56a16
Reviewed-on: https://go-review.googlesource.com/34332
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Picks up changes made in previous commits.
Change-Id: I8edc9e0a512e4d687c471274faaa06e0b40ea657
Reviewed-on: https://go-review.googlesource.com/34283
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Resolve symlinks in source directories (GOPATH, GOROOT, etc.) and source
files in order to find correct package. All I/O performed through
build.Context. Also add minor fix to guru unit tests in order to pass on
Windows.
Change-Id: Ie6134b9cd74eb7386e1d93603eb37c8e44b083b8
Reviewed-on: https://go-review.googlesource.com/33924
Reviewed-by: Alan Donovan <adonovan@google.com>
Add condition to prevent unit tests from checking cases with symlinks on
Windows and Plan 9.
Change-Id: Idc41db94a04a0daab556a26390db3f75ded7be73
Reviewed-on: https://go-review.googlesource.com/33923
Reviewed-by: Alan Donovan <adonovan@google.com>
Reason: ContainingPackage should do all I/O through build.Context.
This reverts commit 3a9a2cbbc4.
Change-Id: I3897d8da5026ddc470989e3f239540286e89df4d
Reviewed-on: https://go-review.googlesource.com/33922
Reviewed-by: Alan Donovan <adonovan@google.com>
Reason: ContainingPackage must do all I/O through build.Context.
This reverts commit c945ee3be4.
Change-Id: I625410bc754ea2d150be097bf424de2be42acde4
Reviewed-on: https://go-review.googlesource.com/33921
Reviewed-by: Alan Donovan <adonovan@google.com>
Restructure tests to account for possibility of being run on Windows
(which doesn't handle symlinks).
Change-Id: I428db26c9a1aad337d8972baa2b71468be3a2e58
Reviewed-on: https://go-review.googlesource.com/33920
Reviewed-by: Alan Donovan <adonovan@google.com>
Resolve symlinks in source directories (GOPATH, GOROOT, etc.) and source
files in order to find correct package.
Fixesgolang/go#16219
Change-Id: I6fae14908827d5ebac55dfe455eaf616f71f8767
Reviewed-on: https://go-review.googlesource.com/33919
Reviewed-by: Alan Donovan <adonovan@google.com>
Fix reference to OverlayContext in the doc for
ParseOverlayArchive.
Change-Id: I0b1db478489764fa309cb2e2f788865ac7ff71bb
Reviewed-on: https://go-review.googlesource.com/33916
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Resolve symlinks in GOPATH or source file path in order to find correct package.
Fixesgolang/go#17515
Change-Id: Iaf7e85578fce040b329427ce6f51948a69e57a39
Reviewed-on: https://go-review.googlesource.com/33858
Reviewed-by: Alan Donovan <adonovan@google.com>
This allows markup bracketed by punctuation even when the
punctuation has text on the other side, like in:
- Markup—_especially_italic_text_—can easily be overused.
- We want to increase `go`vet`'s usage.
Change-Id: I0c6ca790f23f705d8c8ba8a225c0280b916ebb6c
Reviewed-on: https://go-review.googlesource.com/33662
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Now without regexps and allocations.
And also match comments like:
// Foo, if non-nil, ...
The comma confused the old pattern.
Updates golang/go#16753
Change-Id: I9016ee7b5933ea343950a39989952804c74a598b
Reviewed-on: https://go-review.googlesource.com/33755
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
If built with the "autocert" build tag, use
golang.org/x/crypto/autocert and for automatic TLS certs.
This will be used for https://beta.golang.org/ running on GCE.
Change-Id: Id0e385796a25d663708ea9bb65c45cb1471dd526
Reviewed-on: https://go-review.googlesource.com/33751
Reviewed-by: Chris Broadfoot <cbro@golang.org>
This adds <span id="StructName.FieldName"> elements around
field names, starting at the comment if present, so people
can link to /pkg/somepkg/#SomeStruct.SomeField.
Fixesgolang/go#16753
Change-Id: I4a8b30605d18e9e33e3d42f273a95067ac491438
Reviewed-on: https://go-review.googlesource.com/33690
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Attempt to update doc comments when renaming an identifier.
This reduces the amount of manual steps that need to be taken
when using gorename.
All occurrences of the old identifier are updated in the doc.
The update is done using a regex to ensure that we replace
whole word matches only.
Fixesgolang/go#17994
Change-Id: I4265021b5b34cf7d70bf43ad6ceee74ec132f185
Reviewed-on: https://go-review.googlesource.com/33452
Reviewed-by: Alan Donovan <adonovan@google.com>
No semantic change.
Pointed out by Dmitri Shuralyov on CL 33578.
Change-Id: Ic67f41e8dde8fc9bf624c98307a89bbe1f10e7f7
Reviewed-on: https://go-review.googlesource.com/33659
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
* Give the article title a larger, heavier font than any heading.
It was strange that the title was 20px regular while the
h1 section headings were 24px.
* Move the author attribution to the top of the page.
Author at the bottom, like a signature, may make sense for blog posts,
but I think it makes less sense for articles.
* Fix the spacing around author lines. Each author line is a <p>
and the intent seemed to be to cut the vertical space between them
but that wasn't working.
* Give the table of contents a title, to make clearer what it is.
Do not show table of contents in printouts.
Change-Id: Iee940ca7697015281fc057750f5db56f70393836
Reviewed-on: https://go-review.googlesource.com/33578
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
We already have anchors for godoc types and functions. Add them for
every heading (and "dl") on every other page on the site.
Change-Id: Ibad77f04442e48dd5a41de759010625f89b48604
Reviewed-on: https://go-review.googlesource.com/33641
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
For package paths that include a "vendor" segment, use only the
portion of the path that comes after the final "vendor" segment, as
is done by the imports package.
Fixesgolang/go#17247
Change-Id: Ic83c4662cfddd1a696c206494b3a869e8c7dff5c
Reviewed-on: https://go-review.googlesource.com/29851
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit quadruples the maximum number of states and the size of the
action table to allow for larger grammars.
Fixesgolang/go#11517
Change-Id: Ieb64efa8e3402ae1a5a9190710f98a44195ecd1b
Reviewed-on: https://go-review.googlesource.com/33585
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Also: drop all pretense of support for platforms other than darwin and linux.
This package is just a test of go/ssa, not a portable interpreter, and these
are the only platforms to which I have easy access.
Builds on: freebsd darwin plan9 linux windows
Change-Id: I965abc67b1280d33e933b83607a4372d65e070cf
Reviewed-on: https://go-review.googlesource.com/33163
Reviewed-by: Robert Griesemer <gri@golang.org>
The existing implementation shows a comment after its code block.
This causes confusion regarding how the comment relates to a code block.
Comments have been moved before their relative code blocks.
Fixesgolang/go#16728
Change-Id: Ie07a6dd2f340a2555513662f263d26377060f93b
Reviewed-on: https://go-review.googlesource.com/33279
Reviewed-by: Alan Donovan <adonovan@google.com>
Add identical workaround from gorename to guru. Only affects queries
that typecheck the code first.
Fixesgolang/go#16530
Change-Id: I718cfceb8d26868eea9128c8873b164333c50f53
Reviewed-on: https://go-review.googlesource.com/33359
Reviewed-by: Alan Donovan <adonovan@google.com>
The SHA sums are clearly visible (and copy-pastable) in the expanded section
immediately below it.
Fixesgolang/go#16900.
Change-Id: If1805534b3893f6c38f4170c4b457ff0e935ce28
Reviewed-on: https://go-review.googlesource.com/33290
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The export data formats (text and binary) emitted by gc in Go 1.7 did
not record the package that "owns" each blank field, even though blank
is an unexported identifier. Before, gcimporter would assume the
package of the export data file owns blank fields within it, even
blank fields reexported from another package. As a result, identical
types would become nonidentical during reexporting.
For bug compatibility with gc, gcimporter now treats blank fields as
if they all belong to the same dummy package, avoiding spurious "can't
assign A to B" errors in tools based on go/types.
Change-Id: I0dbf71491a0ec0f376e9dc8a91efe0376c855a28
Reviewed-on: https://go-review.googlesource.com/33146
Reviewed-by: Robert Griesemer <gri@golang.org>
We already are compatible with the latest format. Update version.
Tested against 1.6, 1.7, and tip.
Fixesgolang/go#17734.
Change-Id: Ia167adf0ed1de371c348329513819fb9e8ca2628
Reviewed-on: https://go-review.googlesource.com/33113
Reviewed-by: Alan Donovan <adonovan@google.com>
We don't support Go1.5 anymore.
Tested with 1.6, 1.7, and tip.
For golang/go#17734.
Change-Id: I718c7996b99f9b98744346e119ee209b4709a070
Reviewed-on: https://go-review.googlesource.com/33111
Reviewed-by: Alan Donovan <adonovan@google.com>