1
0
mirror of https://github.com/golang/go synced 2024-11-06 08:26:12 -07:00
go/src/flag
Russ Cox 49543695c5 flag: arrange for FlagSet.Usage to be non-nil by default
This allows callers to invoke f.Usage() themselves and get the default
usage handler instead of a panic (from calling a nil function).

Fixes #16955.

Change-Id: Ie337fd9e1f85daf78c5eae7b5c41d5ad8c1f89bf
Reviewed-on: https://go-review.googlesource.com/31576
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2016-10-26 16:13:40 +00:00
..
example_test.go
export_test.go flag: arrange for FlagSet.Usage to be non-nil by default 2016-10-26 16:13:40 +00:00
flag_test.go flag: recognize "0s" as the zero value for a flag.Duration 2016-05-31 23:45:47 +00:00
flag.go flag: arrange for FlagSet.Usage to be non-nil by default 2016-10-26 16:13:40 +00:00