diff --git a/cmd/txtar-c/savedir.go b/cmd/txtar-c/savedir.go index 07f0ab27..2c2246d9 100644 --- a/cmd/txtar-c/savedir.go +++ b/cmd/txtar-c/savedir.go @@ -10,7 +10,6 @@ // // See https://godoc.org/github.com/rogpeppe/go-internal/txtar for details of the format // and how to parse a txtar file. -// package main import ( diff --git a/cmd/txtar-goproxy/main.go b/cmd/txtar-goproxy/main.go index 161cc769..c4f0553a 100644 --- a/cmd/txtar-goproxy/main.go +++ b/cmd/txtar-goproxy/main.go @@ -8,9 +8,9 @@ // This allows interactive experimentation with the set of proxied modules. // For example: // -// cd cmd/go -// go test -proxy=localhost:1234 & -// export GOPROXY=http://localhost:1234/mod +// cd cmd/go +// go test -proxy=localhost:1234 & +// export GOPROXY=http://localhost:1234/mod // // and then run go commands as usual. package main diff --git a/cmd/txtar-x/extract.go b/cmd/txtar-x/extract.go index 38d1a9fd..ce3c975a 100644 --- a/cmd/txtar-x/extract.go +++ b/cmd/txtar-x/extract.go @@ -10,7 +10,6 @@ // // See https://godoc.org/github.com/rogpeppe/go-internal/txtar for details of the format // and how to parse a txtar file. -// package main import ( diff --git a/fmtsort/sort.go b/fmtsort/sort.go index 0fb5187d..7f518541 100644 --- a/fmtsort/sort.go +++ b/fmtsort/sort.go @@ -36,19 +36,18 @@ func (o *SortedMap) Swap(i, j int) { // // The ordering rules are more general than with Go's < operator: // -// - when applicable, nil compares low -// - ints, floats, and strings order by < -// - NaN compares less than non-NaN floats -// - bool compares false before true -// - complex compares real, then imag -// - pointers compare by machine address -// - channel values compare by machine address -// - structs compare each field in turn -// - arrays compare each element in turn. -// Otherwise identical arrays compare by length. -// - interface values compare first by reflect.Type describing the concrete type -// and then by concrete value as described in the previous rules. -// +// - when applicable, nil compares low +// - ints, floats, and strings order by < +// - NaN compares less than non-NaN floats +// - bool compares false before true +// - complex compares real, then imag +// - pointers compare by machine address +// - channel values compare by machine address +// - structs compare each field in turn +// - arrays compare each element in turn. +// Otherwise identical arrays compare by length. +// - interface values compare first by reflect.Type describing the concrete type +// and then by concrete value as described in the previous rules. func Sort(mapValue reflect.Value) *SortedMap { if mapValue.Type().Kind() != reflect.Map { return nil diff --git a/imports/build.go b/imports/build.go index 5fd0106e..891295c9 100644 --- a/imports/build.go +++ b/imports/build.go @@ -32,7 +32,6 @@ var slashslash = []byte("//") // the purpose of satisfying build tags, in order to estimate // (conservatively) whether a file could ever possibly be used // in any build. -// func ShouldBuild(content []byte, tags map[string]bool) bool { // Pass 1. Identify leading run of // comments and blank lines, // which must be followed by a blank line. @@ -96,7 +95,6 @@ func ShouldBuild(content []byte, tags map[string]bool) bool { // tag (if tags[tag] is true) // !tag (if tags[tag] is false) // a comma-separated list of any of these -// func matchTags(name string, tags map[string]bool) bool { if name == "" { return false @@ -145,12 +143,12 @@ func matchTag(name string, tags map[string]bool, want bool) bool { // suffix which does not match the current system. // The recognized name formats are: // -// name_$(GOOS).* -// name_$(GOARCH).* -// name_$(GOOS)_$(GOARCH).* -// name_$(GOOS)_test.* -// name_$(GOARCH)_test.* -// name_$(GOOS)_$(GOARCH)_test.* +// name_$(GOOS).* +// name_$(GOARCH).* +// name_$(GOOS)_$(GOARCH).* +// name_$(GOOS)_test.* +// name_$(GOARCH)_test.* +// name_$(GOOS)_$(GOARCH)_test.* // // An exception: if GOOS=android, then files with GOOS=linux are also matched. // diff --git a/internal/syscall/windows/registry/key.go b/internal/syscall/windows/registry/key.go index fb89e39a..8ac59d20 100644 --- a/internal/syscall/windows/registry/key.go +++ b/internal/syscall/windows/registry/key.go @@ -23,7 +23,6 @@ // // NOTE: This package is a copy of golang.org/x/sys/windows/registry // with KeyInfo.ModTime removed to prevent dependency cycles. -// package registry import ( diff --git a/modfile/read.go b/modfile/read.go index 1d81ff1a..0e5fa3ec 100644 --- a/modfile/read.go +++ b/modfile/read.go @@ -244,7 +244,6 @@ func (x *Line) Span() (start, end Position) { // "x" // "y" // ) -// type LineBlock struct { Comments Start Position diff --git a/testenv/testenv.go b/testenv/testenv.go index 8f69fe0d..bcac6a50 100644 --- a/testenv/testenv.go +++ b/testenv/testenv.go @@ -30,7 +30,7 @@ func Builder() string { return os.Getenv("GO_BUILDER_NAME") } -// HasGoBuild reports whether the current system can build programs with ``go build'' +// HasGoBuild reports whether the current system can build programs with “go build” // and then run them with os.StartProcess or exec.Command. func HasGoBuild() bool { if os.Getenv("GO_GCFLAGS") != "" { @@ -51,7 +51,7 @@ func HasGoBuild() bool { return true } -// MustHaveGoBuild checks that the current system can build programs with ``go build'' +// MustHaveGoBuild checks that the current system can build programs with “go build” // and then run them with os.StartProcess or exec.Command. // If not, MustHaveGoBuild calls t.Skip with an explanation. func MustHaveGoBuild(t testing.TB) { @@ -63,13 +63,13 @@ func MustHaveGoBuild(t testing.TB) { } } -// HasGoRun reports whether the current system can run programs with ``go run.'' +// HasGoRun reports whether the current system can run programs with “go run.” func HasGoRun() bool { // For now, having go run and having go build are the same. return HasGoBuild() } -// MustHaveGoRun checks that the current system can run programs with ``go run.'' +// MustHaveGoRun checks that the current system can run programs with “go run.” // If not, MustHaveGoRun calls t.Skip with an explanation. func MustHaveGoRun(t testing.TB) { if !HasGoRun() {