aboutsummaryrefslogtreecommitdiff
path: root/src/flag/example_test.go
AgeCommit message (Collapse)Author
2022-10-26flag: clarify that the main func at pkg.go.dev is part of a testing suiteZeke Lu
flag.Example() has this comment: ... one must execute, typically at the start of main (not init!): flag.Parse() We don't run it here because this is not a main function This example function will be renamed to "main" at pkg.go.dev, which makes the comment confusing. See https://pkg.go.dev/flag#example-package. This change modify the comment to clarify this situation. Change-Id: I17357fdaaefe54791fff8fbbf6a33003af207f88 GitHub-Last-Rev: eeea8ce39cda3321d51c6cfe29fbcb2444fbf9cd GitHub-Pull-Request: golang/go#56411 Reviewed-on: https://go-review.googlesource.com/c/go/+/445315 Run-TryBot: Ian Lance Taylor <iant@google.com> Run-TryBot: Rob Pike <r@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Rob Pike <r@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2014-09-08build: move package sources from src/pkg to srcRuss Cox
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.