Skip to content

Commit

Permalink
add time.Duration as type for config -> env
Browse files Browse the repository at this point in the history
  • Loading branch information
mleku committed Dec 5, 2024
1 parent fe63247 commit 8e0a748
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion realy/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"reflect"
"sort"
"strings"
"time"

"go-simpler.org/env"

Expand Down Expand Up @@ -132,7 +133,7 @@ func EnvKV(cfg any) (m KVSlice) {
switch v.(type) {
case string:
val = v.(string)
case no, bo:
case no, bo, time.Duration:
val = fmt.Sprint(v)
case []string:
arr := v.([]string)
Expand Down
2 changes: 1 addition & 1 deletion realy/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.2.36
v1.2.37

0 comments on commit 8e0a748

Please sign in to comment.