Skip to content

Commit

Permalink
Added documentation for time.Duration
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyLoy committed Mar 17, 2020
1 parent a2b5b6c commit 8104df5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8104df5

Please sign in to comment.