Skip to content

Commit 993f2c6

Browse files
rscgopherbot
authored andcommitted
all: gofmt
Gofmt to update doc comments to the new formatting. For golang/go#51082. Change-Id: Ie063c2fd890641b551c0f304fee5fa19121f1b38 Reviewed-on: https://go-review.googlesource.com/c/build/+/399555 Run-TryBot: Russ Cox <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Russ Cox <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent b82e23d commit 993f2c6

File tree

41 files changed

+265
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+265
-236
lines changed

cmd/buildlet/buildlet.go

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,21 @@ var (
6767
// package's client API (via the Status method).
6868
//
6969
// Notable versions:
70-
// 3: switched to revdial protocol
71-
// 5: reverse dialing uses timeouts+tcp keepalives, pargzip fix
72-
// 7: version bumps while debugging revdial hang (Issue 12816)
73-
// 8: mac screensaver disabled
74-
// 11: move from self-signed cert to LetsEncrypt (Issue 16442)
75-
// 15: ssh support
76-
// 16: make macstadium builders always haltEntireOS
77-
// 17: make macstadium halts use sudo
78-
// 18: set TMPDIR and GOCACHE
79-
// 21: GO_BUILDER_SET_GOPROXY=coordinator support
80-
// 22: TrimSpace the reverse buildlet's gobuildkey contents
81-
// 23: revdial v2
82-
// 24: removeAllIncludingReadonly
83-
// 25: use removeAllIncludingReadonly for all work area cleanup
70+
//
71+
// 3: switched to revdial protocol
72+
// 5: reverse dialing uses timeouts+tcp keepalives, pargzip fix
73+
// 7: version bumps while debugging revdial hang (Issue 12816)
74+
// 8: mac screensaver disabled
75+
// 11: move from self-signed cert to LetsEncrypt (Issue 16442)
76+
// 15: ssh support
77+
// 16: make macstadium builders always haltEntireOS
78+
// 17: make macstadium halts use sudo
79+
// 18: set TMPDIR and GOCACHE
80+
// 21: GO_BUILDER_SET_GOPROXY=coordinator support
81+
// 22: TrimSpace the reverse buildlet's gobuildkey contents
82+
// 23: revdial v2
83+
// 24: removeAllIncludingReadonly
84+
// 25: use removeAllIncludingReadonly for all work area cleanup
8485
const buildletVersion = 25
8586

8687
func defaultListenAddr() string {

cmd/cl/cl.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ By default, CL omits closed CLs, those with an R=close reply
3434
and no subsequent upload of a new patch set.
3535
If the -closed flag is specified, CL adds closed CLs to the output.
3636
37-
By default, CL omits CLs containing ``DO NOT REVIEW'' in the
37+
By default, CL omits CLs containing DO NOT REVIEW in the
3838
latest patch's commit message.
3939
If the -dnr flag is specified, CL includes those CLs in its output.
4040
4141
If the -r flag is specified, CL shows only CLs that need review,
4242
not those waiting for the author. In this mode, the
43-
redundant ``waiting for reviewer'' asterisk is elided.
43+
redundant waiting for reviewer asterisk is elided.
4444
4545
If the -url flag is specified, CL replaces "CL 1234" at the beginning
4646
of each output line with a full URL, "https://golang.org/cl/1234".

cmd/coordinator/buildstatus.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,9 +1169,8 @@ func (st *buildStatus) runSubrepoTests() (remoteErr, err error) {
11691169
// The logic of the go tool for ignoring directories is documented at
11701170
// https://golang.org/cmd/go/#hdr-Package_lists_and_patterns:
11711171
//
1172-
// Directory and file names that begin with "." or "_" are ignored
1173-
// by the go tool, as are directories named "testdata".
1174-
//
1172+
// Directory and file names that begin with "." or "_" are ignored
1173+
// by the go tool, as are directories named "testdata".
11751174
func ignoredByGoTool(importPath string) bool {
11761175
for _, el := range strings.Split(importPath, "/") {
11771176
if strings.HasPrefix(el, ".") || strings.HasPrefix(el, "_") || el == "testdata" {

cmd/coordinator/coordinator.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ var testFiles = map[string]string{
150150

151151
// httpRouter is the coordinator's handler, routing traffic to one of
152152
// two locations:
153-
// 1) a buildlet, from gomote clients (if X-Buildlet-Proxy is set)
154-
// 2) traffic to the coordinator itself (the default)
153+
// 1. a buildlet, from gomote clients (if X-Buildlet-Proxy is set)
154+
// 2. traffic to the coordinator itself (the default)
155155
func httpRouter(next http.Handler) http.Handler {
156156
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
157157
if r.Header.Get("X-Buildlet-Proxy") != "" {
@@ -2025,9 +2025,10 @@ func randHex(n int) string {
20252025
// import path, it always has forward slashes and no trailing slash.
20262026
//
20272027
// For example:
2028-
// "net" -> "golang.org/x/net"
2029-
// "crypto" -> "golang.org/x/crypto"
2030-
// "dl" -> "golang.org/dl"
2028+
//
2029+
// "net" -> "golang.org/x/net"
2030+
// "crypto" -> "golang.org/x/crypto"
2031+
// "dl" -> "golang.org/dl"
20312032
func importPathOfRepo(repo string) string {
20322033
r := repos.ByGerritProject[repo]
20332034
if r == nil {

cmd/coordinator/internal/legacydash/ui.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,8 @@ func cleanTitle(title, viewBranch string) string {
441441

442442
// failuresView renders https://build.golang.org/?mode=failures, where it outputs
443443
// one line per failure on the front page, in the form:
444-
// hash builder failure-url
444+
//
445+
// hash builder failure-url
445446
type failuresView struct{}
446447

447448
func (failuresView) ShowsActiveBuilds() bool { return false }

cmd/coordinator/remote.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,13 +774,13 @@ func setWinsize(f *os.File, w, h int) {
774774
//
775775
// The instance name is of two forms. The normal form is:
776776
//
777-
// user-bradfitz-linux-amd64-0
777+
// user-bradfitz-linux-amd64-0
778778
//
779779
// The overloaded form to convey that the user accepts responsibility
780780
// for changes to the underlying host is to prefix the same instance
781781
// name with the string "mutable-", such as:
782782
//
783-
// mutable-user-bradfitz-darwin-amd64-10_8-0
783+
// mutable-user-bradfitz-darwin-amd64-10_8-0
784784
//
785785
// The mutable part is ignored by this function.
786786
func userFromGomoteInstanceName(name string) string {

cmd/coordinator/status.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,6 @@ func reverseHostChecker(hosts []string) func(cw *checkWriter) {
534534
// and reports when the hourly quota has been exceeded.
535535
//
536536
// It also records metrics to track remaining rate limit over time.
537-
//
538537
func newGitHubAPIChecker(ctx context.Context, sc *secret.Client) *healthChecker {
539538
// githubRate is the status of the GitHub API v3 client.
540539
// It's of type *github.Rate; no value means no result yet,

cmd/debugnewvm/debugnewvm.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ func main() {
225225
}
226226

227227
// watchSerial streams the named VM's serial port to log.Printf. It's roughly:
228-
// gcloud compute connect-to-serial-port --zone=xxx $NAME
228+
//
229+
// gcloud compute connect-to-serial-port --zone=xxx $NAME
230+
//
229231
// but in Go and works. For some reason, gcloud doesn't work as a
230232
// child process and has weird errors.
231233
// TODO(golang.org/issue/39485) - investigate if this is possible for EC2 instances

cmd/fetchlogs/fetchlogs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// to be the SHA-1 of their contents). The rev/ directory contains
1313
// symlinks back to these logs named
1414
//
15-
// rev/<ISO 8601 commit date>-<git revision>/<builder>
15+
// rev/<ISO 8601 commit date>-<git revision>/<builder>
1616
//
1717
// Fetchlogs will reuse existing log files and revision symlinks, so
1818
// it only has to download logs that are new since the last time it
@@ -22,7 +22,7 @@
2222
// example, to list the revisions and builders with a particular
2323
// failure, use:
2424
//
25-
// grep -lR <regexp> rev | sort
25+
// grep -lR <regexp> rev | sort
2626
package main
2727

2828
import (

cmd/gomote/gomote.go

Lines changed: 52 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -10,68 +10,68 @@ See https://golang.org/wiki/Gomote
1010
1111
Usage:
1212
13-
gomote [global-flags] cmd [cmd-flags]
13+
gomote [global-flags] cmd [cmd-flags]
1414
15-
For example,
16-
$ gomote create openbsd-amd64-60
17-
user-username-openbsd-amd64-60-0
18-
$ gomote push user-username-openbsd-amd64-60-0
19-
$ gomote run user-username-openbsd-amd64-60-0 go/src/make.bash
20-
$ gomote run user-username-openbsd-amd64-60-0 go/bin/go test -v -short os
15+
For example,
16+
$ gomote create openbsd-amd64-60
17+
user-username-openbsd-amd64-60-0
18+
$ gomote push user-username-openbsd-amd64-60-0
19+
$ gomote run user-username-openbsd-amd64-60-0 go/src/make.bash
20+
$ gomote run user-username-openbsd-amd64-60-0 go/bin/go test -v -short os
2121
2222
To list the subcommands, run "gomote" without arguments:
2323
24-
Commands:
25-
26-
create create a buildlet; with no args, list types of buildlets
27-
destroy destroy a buildlet
28-
gettar extract a tar.gz from a buildlet
29-
list list active buildlets
30-
ls list the contents of a directory on a buildlet
31-
ping test whether a buildlet is alive and reachable
32-
push sync your GOROOT directory to the buildlet
33-
put put files on a buildlet
34-
put14 put Go 1.4 in place
35-
puttar extract a tar.gz to a buildlet
36-
rm delete files or directories
37-
rdp RDP (Remote Desktop Protocol) to a Windows buildlet
38-
run run a command on a buildlet
39-
ssh ssh to a buildlet
24+
Commands:
25+
26+
create create a buildlet; with no args, list types of buildlets
27+
destroy destroy a buildlet
28+
gettar extract a tar.gz from a buildlet
29+
list list active buildlets
30+
ls list the contents of a directory on a buildlet
31+
ping test whether a buildlet is alive and reachable
32+
push sync your GOROOT directory to the buildlet
33+
put put files on a buildlet
34+
put14 put Go 1.4 in place
35+
puttar extract a tar.gz to a buildlet
36+
rm delete files or directories
37+
rdp RDP (Remote Desktop Protocol) to a Windows buildlet
38+
run run a command on a buildlet
39+
ssh ssh to a buildlet
4040
4141
To list all the builder types available, run "create" with no arguments:
4242
43-
$ gomote create
44-
(list tons of buildlet types)
43+
$ gomote create
44+
(list tons of buildlet types)
4545
4646
The "gomote run" command has many of its own flags:
4747
48-
$ gomote run -h
49-
run usage: gomote run [run-opts] <instance> <cmd> [args...]
50-
-builderenv string
51-
Optional alternate builder to act like. Must share the same
52-
underlying buildlet host type, or it's an error. For
53-
instance, linux-amd64-race is compatible
54-
with linux-amd64, but openbsd-amd64 and openbsd-386 are
55-
different hosts.
56-
-debug
57-
write debug info about the command's execution before it begins
58-
-dir string
59-
Directory to run from. Defaults to the directory of the
60-
command, or the work directory if -system is true.
61-
-e value
62-
Environment variable KEY=value. The -e flag may be repeated
63-
multiple times to add multiple things to the environment.
64-
-path string
65-
Comma-separated list of ExecOpts.Path elements. The special
66-
string 'EMPTY' means to run without any $PATH. The empty
67-
string (default) does not modify the $PATH. Otherwise, the
68-
following expansions apply: the string '$PATH' expands to
69-
the current PATH element(s), the substring '$WORKDIR'
70-
expands to the buildlet's temp workdir.
71-
-system
72-
run inside the system, and not inside the workdir; this is implicit if cmd starts with '/'
73-
74-
Debugging buildlets directly
48+
$ gomote run -h
49+
run usage: gomote run [run-opts] <instance> <cmd> [args...]
50+
-builderenv string
51+
Optional alternate builder to act like. Must share the same
52+
underlying buildlet host type, or it's an error. For
53+
instance, linux-amd64-race is compatible
54+
with linux-amd64, but openbsd-amd64 and openbsd-386 are
55+
different hosts.
56+
-debug
57+
write debug info about the command's execution before it begins
58+
-dir string
59+
Directory to run from. Defaults to the directory of the
60+
command, or the work directory if -system is true.
61+
-e value
62+
Environment variable KEY=value. The -e flag may be repeated
63+
multiple times to add multiple things to the environment.
64+
-path string
65+
Comma-separated list of ExecOpts.Path elements. The special
66+
string 'EMPTY' means to run without any $PATH. The empty
67+
string (default) does not modify the $PATH. Otherwise, the
68+
following expansions apply: the string '$PATH' expands to
69+
the current PATH element(s), the substring '$WORKDIR'
70+
expands to the buildlet's temp workdir.
71+
-system
72+
run inside the system, and not inside the workdir; this is implicit if cmd starts with '/'
73+
74+
# Debugging buildlets directly
7575
7676
Using "gomote create" contacts the build coordinator
7777
(farmer.golang.org) and requests that it create the buildlet on your
@@ -80,7 +80,6 @@ then proxy your request via the coordinator. To access a buildlet
8080
directly (for example, when working on the buildlet code), you can
8181
skip the "gomote create" step and use the special builder name
8282
"<build-config-name>@ip[:port>", such as "[email protected]".
83-
8483
*/
8584
package main
8685

0 commit comments

Comments
 (0)