can pull states from email and fill config file

This commit is contained in:
Bel LaPointe
2022-01-10 00:21:56 -05:00
parent 366b35d76b
commit 3d76fffdd3
5 changed files with 58 additions and 10 deletions

View File

@@ -11,6 +11,10 @@ func (d Duration) Get() time.Duration {
return time.Duration(d)
}
func (d *Duration) MarshalJSON() ([]byte, error) {
return json.Marshal(d.Get().String())
}
func (d *Duration) UnmarshalJSON(b []byte) error {
var s string
if err := json.Unmarshal(b, &s); err != nil {