1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:14:46 -07:00
go/godoc
Sebastien Binet 473fd854f8 godoc/static: insert newlines in -src mode
Running 'godoc -src' would end up with concatenated sources:

$ godoc -src github.com/bradfitz/http2 Frame
// a frameParser parses a frame given its FrameHeader and payload
// bytes. The length of payload will always equal fh.Length (which
// might be 0).
type frameParser func(fh FrameHeader, payload []byte) (Frame, error)//
A Frame is the base interface implemented by all frame types.
// Callers will generally type-assert the specific frame type:
// *HeadersFrame, *SettingsFrame, *WindowUpdateFrame, etc.
//
// Frames are only valid until the next call to Framer.ReadFrame.
type Frame interface {

Unconditionnally insert two newlines:

$ godoc -src github.com/bradfitz/http2 Frame
// a frameParser parses a frame given its FrameHeader and payload
// bytes. The length of payload will always equal fh.Length (which
// might be 0).
type frameParser func(fh FrameHeader, payload []byte) (Frame, error)

// A Frame is the base interface implemented by all frame types.
// Callers will generally type-assert the specific frame type:
// *HeadersFrame, *SettingsFrame, *WindowUpdateFrame, etc.
//
// Frames are only valid until the next call to Framer.ReadFrame.
type Frame interface {

Fixes #9726.

Change-Id: I51ee04e53d4962c890ea601125eda8fce84d6a46
Reviewed-on: https://go-review.googlesource.com/7681
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-03-18 17:28:59 +00:00
..
analysis go/loader: rename SourceImports flag to ImportFromBinary and invert sense 2015-02-23 23:01:10 +00:00
redirect godoc/redirect: update the rules for /cl/ redirect 2014-12-22 03:14:31 +00:00
static godoc/static: insert newlines in -src mode 2015-03-18 17:28:59 +00:00
util tools: add import comments. 2014-12-09 22:42:16 +00:00
vfs tools: add import comments. 2014-12-09 22:42:16 +00:00
cmdline_test.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
cmdline.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
corpus.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
dirtrees.go cmd/godoc: do not apply package path restrictions onto GOROOT when indexing. 2014-10-23 09:34:01 -07:00
format.go go.tools/godoc: Fix jump-to-line in source view. 2013-08-01 11:52:25 +10:00
godoc_test.go go.tools/godoc: deal with fallout from $GOROOT/src/pkg -> $GOROOT/src renaming. 2014-09-10 09:02:54 -04:00
godoc.go tools: add import comments. 2014-12-09 22:42:16 +00:00
index_test.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
index.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
linkify.go godoc: remove the last of the global variables, unexport Server 2013-07-19 10:27:53 +10:00
meta.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
page.go godoc: set expvar for http.ResponseWriter errors. 2014-01-29 10:53:45 -05:00
parser.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
pres.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
search.go godoc: Fix dereference of nil *SearchResult. 2014-02-20 11:26:05 -05:00
server_test.go godoc: set expvar for http.ResponseWriter errors. 2014-01-29 10:53:45 -05:00
server.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
snippet.go godoc: remove more global variables 2013-07-18 13:14:09 +10:00
spec.go godoc: move bulk of the code to the package 2013-07-17 17:09:54 +10:00
spot.go godoc: add search results that point to documentation instead of source. 2013-11-21 11:55:42 -05:00
tab.go godoc: remove more global variables 2013-07-18 13:14:09 +10:00
template.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00