Serpent's current way to handle time.Duration is directly mapped to how Golang itself is handling it.
As Serpent is a CLI, used mostly with flags, it can lead to situations like --flag 720h for a month or --flag 8760h for a year.
We could add some custom options to make it more readable :
1d for a day
1y for a year
(open to more options)
- To keep it simple, we can use the time package and
time.AddDate() function to ensure consistency.
Serpent's current way to handle time.Duration is directly mapped to how Golang itself is handling it.
As Serpent is a CLI, used mostly with flags, it can lead to situations like
--flag 720hfor a month or--flag 8760hfor a year.We could add some custom options to make it more readable :
1dfor a day1yfor a year(open to more options)
time.AddDate()function to ensure consistency.