1
0
mirror of https://github.com/golang/go synced 2024-11-17 14:14:56 -07:00
go/src/flag
Ian Lance Taylor 3659645cb1 flag: recognize "0s" as the zero value for a flag.Duration
Implemented by using a reflect-based approach to recognize the zero
value of any non-interface type that implements flag.Value.  Interface
types will fall back to the old code.

Fixes #15904.

Change-Id: I594c3bfb30e9ab1aca3e008ef7f70be20aa41a0b
Reviewed-on: https://go-review.googlesource.com/23581
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2016-05-31 23:45:47 +00:00
..
example_test.go
export_test.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +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: recognize "0s" as the zero value for a flag.Duration 2016-05-31 23:45:47 +00:00