accept loop param on task

This commit is contained in:
Bel LaPointe
2021-07-17 10:34:22 -06:00
parent 6abfab229a
commit 81c8743de7
5 changed files with 34 additions and 12 deletions

View File

@@ -60,6 +60,11 @@ func ToStrArr(k string) []string {
return outArr
}
func ToDuration(s string) time.Duration {
d, _ := time.ParseDuration(s)
return d
}
func ToTime(s string) time.Time {
v, err := time.Parse("2006-01-02 15:04:05", s)
if err != nil || v.IsZero() {