Commit e9f8d676 authored by Agniva De Sarker's avatar Agniva De Sarker Committed by Agniva De Sarker

flag: clarify that a flag cannot be re-defined

Fixes #31694

Change-Id: Ifb2ad2dc41c449668c0f6a4d4cfb9b583e5591f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/206126Reviewed-by: default avatarRob Pike <r@golang.org>
parent 0e312f21
......@@ -314,6 +314,9 @@ const (
// A FlagSet represents a set of defined flags. The zero value of a FlagSet
// has no name and has ContinueOnError error handling.
//
// Flag names must be unique within a FlagSet. An attempt to define a flag whose
// name is already in use will cause a panic.
type FlagSet struct {
// Usage is the function called when an error occurs while parsing flags.
// The field is a function (not a method) that may be changed to point to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment