diff --git a/README.md b/README.md index 4f57c0d..ff86abf 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ It's just simple, pure stdlib. * A field's type determines what [strconv](https://golang.org/pkg/strconv/) function is called. * All string conversion rules are as defined in the [strconv](https://golang.org/pkg/strconv/) package +* time.Duration follows the same parsing rules as [time.ParseDuration](https://golang.org/pkg/time#ParseDuration) * If chaining multiple data sources, data sets are merged. Later values override previous values. ```go diff --git a/config.go b/config.go index e12bd4e..36184c3 100644 --- a/config.go +++ b/config.go @@ -8,6 +8,8 @@ // // All string conversion rules are as defined in the https://golang.org/pkg/strconv/ package. // +// time.Duration follows the same parsing rules as time.ParseDuration +// // If chaining multiple data sources, data sets are merged. // // Later values override previous values. @@ -59,6 +61,7 @@ func newBuilder() *Builder { // Supported fields: // * all int, uint, float variants // * bool, struct, string +// * time.Duration // * slice of any of the above, except for []struct{} // It returns an error if: // * struct contains unsupported fields (pointers, maps, slice of structs, channels, arrays, funcs, interfaces, complex)