1
0
mirror of https://github.com/golang/go synced 2024-10-01 04:08:32 -06:00
Commit Graph

36 Commits

Author SHA1 Message Date
Andrew Gerrand
5ebbcd132f go.tools: use golang.org/x/... import paths
Rewrite performed with this command:
  sed -i '' 's_code.google.com/p/go\._golang.org/x/_g' \
    $(grep -lr 'code.google.com/p/go.' *)

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/170920043
2014-11-10 08:50:40 +11:00
Alan Donovan
b94e29089b godoc: run bake.sh again.
CL 141540043 was half-baked.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/142130043
2014-09-15 13:13:07 -04:00
Alan Donovan
ebc87c5c5e godoc: fix bug in "internal call graph" tree widget.
Today I learned that getElementByClass returns an
HTMLContainer, not an array, so the for loop was iterating its
properties, which include:
- the methods of the type, which were filtered out by the condition;
- the array-like integer indices of the elements, which we want;
- the ids of the same elements (!), which we weren't expecting.
The net result is that various functions were called twice,
causing the tree to be double-populated and clicks to cause
and expand+collapse.

It's a miracle to me that any JS program even approximately works.

Fixes golang/go#8237

LGTM=bradfitz
R=gri, bradfitz
CC=golang-codereviews
https://golang.org/cl/141540043
2014-09-15 13:00:40 -04:00
Alan Donovan
6c93dbff3e go.tools/godoc: deal with fallout from $GOROOT/src/pkg -> $GOROOT/src renaming.
To avoid breaking URLs, we redirect /src/pkg/* to /src/*.

The URL /pkg is now the "directory" /src, which triggers the
"Packages" index.

All other references to "src/pkg" are now gone,
except a number in the namespace documentation which are
probably still illustrative.

Tested: go test cmd/godoc godoc
        Manual inspection of src and src/pkg pages.
        with GOROOT and GOPATH packages
        -analysis
        /AUTHORS file URL still works

LGTM=bradfitz, adg
R=bradfitz, adg
CC=golang-codereviews
https://golang.org/cl/141770044
2014-09-10 09:02:54 -04:00
Andrew Gerrand
96adaa5618 go.tools/godoc: remove Google+ buttons
LGTM=bradfitz
R=golang-codereviews, bradfitz, dsymonds
CC=golang-codereviews
https://golang.org/cl/138180043
2014-09-08 10:05:20 +10:00
Andrew Gerrand
277e5a16d7 go.tools/godoc: mention sub-repos and package indexes on packages page
Also several cosmetic tweaks to the package page.

LGTM=r, bradfitz
R=bradfitz, r
CC=golang-codereviews
https://golang.org/cl/128490043
2014-08-21 09:53:57 +10:00
Francesc Campoy
82b913fb17 playground: add ctrl-enter shortcut for gofmt (as in the tour)
LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/120420044
2014-08-04 15:55:39 -07:00
Andrew Gerrand
8aabc9a084 go.tools/godoc: drop scheme from links
golang.org now serves HTTPS,
so the scripts should work
with either HTTP ot HTTPS.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/111640043
2014-07-25 10:27:31 +10:00
Andrew Gerrand
63db0771ef go.tools/godoc: fix search heading anchors
Right now they're all "Global" so you can't click use the table of
contents headings for "Types", "Functions", and "Methods".

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/118100043
2014-07-23 09:59:58 +10:00
Andrew Gerrand
cc0b856ebe go.tools/godoc/static: remove unnecessary mainframe wrapper
Fixes golang/go#8300.

LGTM=adonovan
R=golang-codereviews, adonovan, bradfitz
CC=golang-codereviews
https://golang.org/cl/113130044
2014-07-16 09:39:11 +10:00
Alan Donovan
99d45c0e8e godoc/analysis: show analysis status in UI (source file view)
Also:
- declare PackageInfo, FileInfo types to simplify API.
- update docs:
        eliminate this TODO item
        document improved analysis times
        state that -analysis=pointer implies -analysis=type

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/112770044
2014-07-09 07:59:55 -04:00
Andrew Gerrand
ba844075b3 go.tools/godoc/static: don't capture ctrl-tab in editor
This fixes an issue where Firefox users can't ctrl-tab out to switch
to other tabs when using the playground.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/106020043
2014-06-16 11:36:20 +10:00
Shenghou Ma
35875c1a92 go.tools/cmd/godoc/static: fix text template for variable examples.
Fixes golang/go#7771.

LGTM=bgarcia
R=golang-codereviews, bradfitz, bgarcia
CC=golang-codereviews
https://golang.org/cl/87180044
2014-04-22 18:46:26 -04:00
Alan Donovan
503140c72e godoc: documentation of -analysis features.
The text and images are "baked in" to the godoc executable's
rodata section (~300KB) and are accessible from the godoc
server itself at /lib/godoc/analysis/help.html.

In due course, the page will become visible at
http://golang.org/lib/godoc/analysis/help.html, which will be
the canonical location for this doc (in announcements, etc).

The page is temporarily visible here, for those on the Google corp network:
http://172.26.104.127:7777/lib/godoc/analysis/help.html

Also:
- add link to new doc from source view pages.
- document -analysis flag in cmd/godoc/doc.go
- fix indentation of -analysis flag's help string

LGTM=gri
R=gri, bgarcia, r
CC=golang-codereviews
https://golang.org/cl/87110045
2014-04-16 16:35:08 -04:00
Robert Griesemer
42a4cd3392 go.tools/godoc: sanitize function signatures for object index
Fixes golang/go#7703.

LGTM=bgarcia
R=bgarcia
CC=golang-codereviews
https://golang.org/cl/84410045
2014-04-07 12:54:28 -07:00
Alan Donovan
f35b5691f3 go.tools/godoc: fix two regressions caused by -analysis CL.
- Add missing methodset.html template file.
- Suppress initial display of package callgraph.
  Client-side JS will make it visible if there is data.

LGTM=bgarcia
R=crawshaw, bgarcia
CC=golang-codereviews
https://golang.org/cl/81550043
2014-03-27 15:30:14 -04:00
Alan Donovan
80c4f06c0f go.tools/godoc: server mode: add support for type and pointer analysis.
See analysis.go for overview of new features.
See README for known bugs and issues.

Much UI polish, testing and optimization work remains, but
this is a starting point.

Flag: we add a new flag -analysis=type,pointer, default "",
for adventurous users only at this stage.
Type analysis takes ~10s for stdlib + go.tools;
Pointer analysis (currently) takes several minutes.

Dependencies: we now include jquery.treeview.js and its GIF
images among the resources.  (bake.go now handles binary.)

LGTM=crawshaw, bgarcia
R=crawshaw, bgarcia
CC=bradfitz, golang-codereviews
https://golang.org/cl/60540044
2014-03-14 18:58:22 -04:00
Brad Garcia
a81074af88 godoc: Output "No match found" only if there is no ast or docs included in info.
Fixes golang/go#7499.

R=minux.ma
CC=golang-codereviews
https://golang.org/cl/75400043
2014-03-14 10:00:10 -04:00
Andrew Gerrand
1a2b7a26cc godoc/static: update site policies link
Fixes golang/go#7520.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/74900047
2014-03-13 10:50:06 +11:00
Brad Garcia
aaca3a4f95 godoc: Remove bogus messages referring to "/target".
Fix package text display spacing.
Fixes golang/go#7395.

R=bradfitz, sameer
CC=golang-codereviews
https://golang.org/cl/68210043
2014-02-26 13:21:44 -05:00
Brad Garcia
61bd98e5b3 godoc: Fix m=src URLs.
For source code links, prepend /src/pkg if not already prefixed.
Fixes golang/go#7383.

R=bradfitz, sameer
CC=golang-codereviews
https://golang.org/cl/67110043
2014-02-21 19:51:51 -05:00
Brad Garcia
2ca2bfc172 godoc: Fix commandline mode output.
Fix output of packages with multiple files.
Remove extra output when filter is requested.
Fixes golang/go#7115.

R=bradfitz, adg
CC=golang-codereviews
https://golang.org/cl/52750044
2014-01-30 06:28:19 -05:00
Brad Garcia
27d851fc2c godoc: Add package identifiers to documentation indexing.
This allows us to show package synopsis in search results.
Fix skipping of test files (prefix changed from "test/" to "/test/").

R=bradfitz, bradfitz
CC=golang-codereviews
https://golang.org/cl/44790044
2014-01-06 13:26:25 -05:00
Brad Garcia
a28efa5d8c godoc: add ability to change or disable the display of search results.
The display of search results can now be changed. A slice of functions for displaying the results can now be provided.  By default, three functions are provided to display documentation, source code, and textual results.
This makes it possible to replace them with equivalents that, say,
obtain search results from alternative source code search engines.

R=bradfitz, adg
CC=golang-codereviews
https://golang.org/cl/43470043
2014-01-06 09:51:01 -05:00
Andrew Gerrand
1de4f6df60 go.tools/godoc/static: add 'fmtImportEl' option to playground
The 'fmtImportEl' option lets the called specify a checkbox element
that determines whether to send the 'imports=true' key/value pair when
calling '/fmt'.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/43240043
2013-12-18 09:32:51 +11:00
Brad Garcia
ff7cfafc58 godoc: Add URLForSrcQuery option to godoc.Presentation.
This allows the creation of URLs to lines of source code with a query
term highlighted without assuming godoc source code URL parameters.
Needed for interfacing with other source code viewing servers.

R=bradfitz
CC=golang-dev
https://golang.org/cl/34200043
2013-12-04 10:37:01 -05:00
Brad Garcia
f3faf8b6e0 godoc: add search results that point to documentation instead of source.
Add explicit options to Corpus to control search indexing of documentation, Go source code, and full-text.

R=bradfitz, r
CC=golang-dev
https://golang.org/cl/24190043
2013-11-21 11:55:42 -05:00
Andrew Gerrand
99890b82e7 go.tools/godoc/static: use preferred JS for Google+ buttons
R=bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/19070044
2013-10-30 13:13:42 +11:00
Shenghou Ma
1e6b0db4b9 go.tools/godoc/static: fix & escape in codewalks
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/14426053
2013-10-13 22:22:48 -04:00
Andrew Gerrand
f8e922be8e go.tools/godoc/static: make this the canonical source for playground JS
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/14184043
2013-10-01 12:11:47 +10:00
Andrew Gerrand
04d74c081e go.tools: sync play.js from go.talks
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/14177043
2013-10-01 11:20:35 +10:00
Andrew Gerrand
c635598ddf go.tools: sync play.js with go.talks
R=golang-dev
CC=golang-dev
https://golang.org/cl/14167044
2013-10-01 10:43:07 +10:00
Andrew Gerrand
88be67fd25 go.tools/present: add -edit and -numbers flags to .code/.play
Also update style.css to hide outline of editable text areas and apply
correct styles to line numbers in non-playground snippets.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13946043
2013-09-27 09:46:08 +10:00
Andrew Gerrand
371fdaacb9 go.tools/godoc: add 'Blog' heading and playground scripts and styles
This is part of altering the blog to be styled like the rest of golang.org.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/13641045
2013-09-18 15:12:51 +10:00
Andrew Gerrand
b9b578154e go.tools/godoc: some content re-organization
Remove References section heading.
Add redirects from old paths to new content.
Add a link to the SubRepositories wiki page from package list.
Add styles for "pop-out" link.

R=r
CC=golang-dev
https://golang.org/cl/13356047
2013-09-16 15:46:38 +10:00
Andrew Gerrand
373fd88c80 go.tools/cmd: move static files into new package 'static'
Fixes golang/go#6200.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12805046
2013-08-21 13:49:05 +10:00