1
0
mirror of https://github.com/golang/go synced 2024-11-05 15:06:09 -07:00
go/godoc
Mohit Agarwal f96de0f7c8 x/tools/cmd/godoc: Examples should be followed by blank a newline
before the beginning of another function.

For example, a snippet in `godoc -ex strings` would change from

<
func Contains(s, substr string) bool
    Contains reports whether substr is within s.

    Example:
        fmt.Println(strings.Contains("seafood", "foo"))
        fmt.Println(strings.Contains("seafood", "bar"))
        fmt.Println(strings.Contains("seafood", ""))
        fmt.Println(strings.Contains("", ""))
        // Output:
        // true
        // false
        // true
        // true
func ContainsAny(s, chars string) bool
    ContainsAny reports whether any Unicode code points in chars are within
    s.

    Example:
        fmt.Println(strings.ContainsAny("team", "i"))
        fmt.Println(strings.ContainsAny("failure", "u & i"))
        fmt.Println(strings.ContainsAny("foo", ""))
        fmt.Println(strings.ContainsAny("", ""))
        // Output:
        // false
        // true
        // false
        // false
func ContainsRune(s string, r rune) bool
>

to

<
func Contains(s, substr string) bool
    Contains reports whether substr is within s.

    Example:
        fmt.Println(strings.Contains("seafood", "foo"))
        fmt.Println(strings.Contains("seafood", "bar"))
        fmt.Println(strings.Contains("seafood", ""))
        fmt.Println(strings.Contains("", ""))
        // Output:
        // true
        // false
        // true
        // true

func ContainsAny(s, chars string) bool
    ContainsAny reports whether any Unicode code points in chars are within
    s.

    Example:
        fmt.Println(strings.ContainsAny("team", "i"))
        fmt.Println(strings.ContainsAny("failure", "u & i"))
        fmt.Println(strings.ContainsAny("foo", ""))
        fmt.Println(strings.ContainsAny("", ""))
        // Output:
        // false
        // true
        // false
        // false

func ContainsRune(s string, r rune) bool
>

Fixes: golang/go#13053

Change-Id: I355870b1e90b2b6ca0104d67e85869593f294252
Reviewed-on: https://go-review.googlesource.com/16329
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-10-28 00:50:53 +00:00
..
analysis go/ssa: rename some API features (incompatible change) 2015-08-31 22:20:12 +00:00
dl godoc/{dl,proxy,short}: move packages out of Google's internal repo 2015-09-23 03:53:05 +00:00
proxy playground, godoc: remove HK and RC from share-blocked country code list 2015-09-28 23:55:41 +00:00
redirect godoc: don't drop the query params when redirecting 2015-10-06 03:11:16 +00:00
short godoc/{dl,proxy,short}: move packages out of Google's internal repo 2015-09-23 03:53:05 +00:00
static godoc/static: have makestatic use the same code header comment as stringer 2015-09-28 01:46:00 +00:00
util tools: add import comments. 2014-12-09 22:42:16 +00:00
vfs godoc/vfs: close file on error 2015-06-01 03:28:17 +00:00
appengine.go godoc: hide and block share functionality from specific countries 2015-09-02 05:52:45 +00:00
cmdline_test.go godoc: add missing copyright 2015-04-27 04:29:37 +00:00
cmdline.go godoc: add missing copyright 2015-04-27 04:29:37 +00: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 x/tools/cmd/godoc: Examples should be followed by blank a newline 2015-10-28 00:50:53 +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 playground, godoc: remove HK and RC from share-blocked country code list 2015-09-28 23:55:41 +00:00
parser.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
pres.go godoc: fix source links for cmd/* 2015-09-11 00:20:26 +00:00
search.go godoc: hide and block share functionality from specific countries 2015-09-02 05:52:45 +00:00
server.go godoc: fix source links for cmd/* 2015-09-11 00:20:26 +00: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: add missing copyright 2015-04-27 04:29:37 +00:00
template.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00