You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The wiki pages have been copied to go.googlesource.com/wiki
and will be code reviewed using Gerrit, like other Go repos.
Unlike other Go repos, self-review will be permitted, and
there is no requirement for Googlers to be involved to make a change.
These relaxations are possible because the wiki has no production code.
The set of wiki +2'ers is a superset of the usual code +2'ers.
Fixesgolang/go#61940.
Change-Id: I01823720091fbaa24e95e9c82abeaadba867a17c
Reviewed-on: https://go-review.googlesource.com/c/website/+/518297
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
This is just a placeholder page for enabling a test.
7
+
In the deployed site it is overwritten with the content of go.googlesource.com/wiki.
8
+
-->
9
+
10
+
Every package should have a package comment. It should immediately precede the ` package ` statement in one of the files in the package. (It only needs to appear in one file.) It should begin with a single sentence that begins "Package _packagename_" and give a concise summary of the package functionality. This introductory sentence will be used in godoc's list of all packages.
11
+
12
+
Subsequent sentences and/or paragraphs can give more details. Sentences should be properly punctuated.
13
+
14
+
```go
15
+
// Package superman implements methods for saving the world.
16
+
//
17
+
// Experience has shown that a small number of procedures can prove
18
+
// helpful when attempting to save the world.
19
+
package superman
20
+
```
21
+
22
+
Nearly every top-level type, const, var and func should have a comment. A comment for bar should be in the form "_bar_ floats on high o'er vales and hills.". The first letter of _bar_ should not be capitalized unless it's capitalized in the code.
23
+
24
+
```go
25
+
// enterOrbit causes Superman to fly into low Earth orbit, a position
26
+
// that presents several possibilities for planet salvation.
27
+
funcenterOrbit() os.Error {
28
+
...
29
+
}
30
+
```
31
+
32
+
All text that you indent inside a comment, godoc will render as a pre-formatted block. This facilitates code samples.
33
+
34
+
```go
35
+
// fight can be used on any enemy and returns whether Superman won.
0 commit comments