Change JWT TTL config from duration to string for flexibility
- The mapstructure library is no longer needed for direct duration parsing since we now store TTLs as string durations (e.g., "15m", "168h") and parse them on demand via helper methods. - This allows more flexible duration formats in configuration and moves the parsing responsibility to the JWT config struct itself.
This commit is contained in:
2
go.mod
2
go.mod
@@ -3,13 +3,13 @@ module github.com/dhao2001/mygo
|
||||
go 1.26.2
|
||||
|
||||
require (
|
||||
github.com/go-viper/mapstructure/v2 v2.4.0
|
||||
github.com/spf13/cobra v1.10.2
|
||||
github.com/spf13/viper v1.21.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||
github.com/sagikazarmark/locafero v0.11.0 // indirect
|
||||
|
||||
Reference in New Issue
Block a user