1
0
mirror of https://github.com/golang/go synced 2024-11-17 19:04:47 -07:00
go/src/flag
Zeke Lu 29674d87e6 flag: clarify that the main func at pkg.go.dev is part of a testing suite
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: eeea8ce39c
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>
2022-10-26 18:59:00 +00:00
..
example_func_test.go
example_test.go flag: clarify that the main func at pkg.go.dev is part of a testing suite 2022-10-26 18:59:00 +00:00
example_textvar_test.go
example_value_test.go
export_test.go
flag_test.go
flag.go