all: gofmt Gofmt to update doc comments to the new formatting. For golang/go#51082. Change-Id: Ic98f647623f234cf5d36309c6204683e151820d7 Reviewed-on: https://go-review.googlesource.com/c/example/+/399596 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
diff --git a/gotypes/defsuses/main.go b/gotypes/defsuses/main.go index 5347f48..bdddc6c 100644 --- a/gotypes/defsuses/main.go +++ b/gotypes/defsuses/main.go
@@ -19,7 +19,7 @@ } ` -//!+ +// !+ func PrintDefsUses(fset *token.FileSet, files ...*ast.File) error { conf := types.Config{Importer: importer.Default()} info := &types.Info{
diff --git a/gotypes/hello/hello.go b/gotypes/hello/hello.go index 01a2862..431bcc1 100644 --- a/gotypes/hello/hello.go +++ b/gotypes/hello/hello.go
@@ -1,4 +1,4 @@ -//!+ +// !+ package main import "fmt"
diff --git a/gotypes/hugeparam/main.go b/gotypes/hugeparam/main.go index 1474403..80fc47e 100644 --- a/gotypes/hugeparam/main.go +++ b/gotypes/hugeparam/main.go
@@ -1,6 +1,7 @@ // The hugeparam command identifies by-value parameters that are larger than n bytes. // // Example: +// // $ ./hugeparams encoding/xml package main @@ -15,7 +16,7 @@ "golang.org/x/tools/go/loader" ) -//!+ +// !+ var bytesFlag = flag.Int("bytes", 48, "maximum parameter size in bytes") var sizeof = (&types.StdSizes{8, 8}).Sizeof // the sizeof function
diff --git a/gotypes/implements/main.go b/gotypes/implements/main.go index 70b4ee5..5c1fc99 100644 --- a/gotypes/implements/main.go +++ b/gotypes/implements/main.go
@@ -10,7 +10,7 @@ "log" ) -//!+input +// !+input const input = `package main type A struct{}
diff --git a/gotypes/lookup/lookup.go b/gotypes/lookup/lookup.go index 4313e2e..074eb72 100644 --- a/gotypes/lookup/lookup.go +++ b/gotypes/lookup/lookup.go
@@ -11,7 +11,7 @@ "strings" ) -//!+input +// !+input const hello = ` package main @@ -32,7 +32,7 @@ //!-input -//!+main +// !+main func main() { fset := token.NewFileSet() f, err := parser.ParseFile(fset, "hello.go", hello, parser.ParseComments)
diff --git a/gotypes/nilfunc/main.go b/gotypes/nilfunc/main.go index 2dbb19c..1e976d9 100644 --- a/gotypes/nilfunc/main.go +++ b/gotypes/nilfunc/main.go
@@ -10,7 +10,7 @@ "log" ) -//!+input +// !+input const input = `package main import "bytes" @@ -50,7 +50,7 @@ }) } -//!+ +// !+ // CheckNilFuncComparison reports unintended comparisons // of functions against nil, e.g., "if x.Method == nil {". func CheckNilFuncComparison(info *types.Info, n ast.Node) {
diff --git a/gotypes/pkginfo/main.go b/gotypes/pkginfo/main.go index 957e01b..15dbf10 100644 --- a/gotypes/pkginfo/main.go +++ b/gotypes/pkginfo/main.go
@@ -1,4 +1,4 @@ -//!+ +// !+ package main import (
diff --git a/gotypes/skeleton/main.go b/gotypes/skeleton/main.go index c3961e2..1e6ee82 100644 --- a/gotypes/skeleton/main.go +++ b/gotypes/skeleton/main.go
@@ -2,6 +2,7 @@ // that implements the specified interface type. // // Example: +// // $ ./skeleton io ReadWriteCloser buffer // // *buffer implements io.ReadWriteCloser. // type buffer struct{ /* ... */ } @@ -24,7 +25,7 @@ const usage = "Usage: skeleton <package> <interface> <concrete>" -//!+ +// !+ func PrintSkeleton(pkg *types.Package, ifacename, concname string) error { obj := pkg.Scope().Lookup(ifacename) if obj == nil {
diff --git a/gotypes/typeandvalue/main.go b/gotypes/typeandvalue/main.go index 7b3b553..c7fb8ed 100644 --- a/gotypes/typeandvalue/main.go +++ b/gotypes/typeandvalue/main.go
@@ -12,7 +12,7 @@ "log" ) -//!+input +// !+input const input = ` package main
diff --git a/gotypes/weave.go b/gotypes/weave.go index cfaa57b..bf8264a 100644 --- a/gotypes/weave.go +++ b/gotypes/weave.go
@@ -2,7 +2,8 @@ // It builds a table of contents and processes %include directives. // // Example usage: -// $ go run weave.go go-types.md > README.md +// +// $ go run weave.go go-types.md > README.md package main import (