From 0008d31ae6fa88f3ef8180f735e4d31b6dbce51d Mon Sep 17 00:00:00 2001 From: siddharth ravikumar Date: Thu, 21 Jul 2022 17:40:33 -0400 Subject: time: `durationToSeconds` -> `Duration` --- time/time.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'time/time.go') diff --git a/time/time.go b/time/time.go index 97bd3d5..a7821d9 100644 --- a/time/time.go +++ b/time/time.go @@ -18,7 +18,7 @@ var durationRegex = regexp.MustCompile(`PT(([0-9]{0,2})?H)?(([0-9]{0,2})?M)?(([0 // Recognizes durations in this format: PT3H4M60S // // [1]: https://en.wikipedia.org/wiki/ISO_8601#Durations -func durationToSeconds(duration string) (int, error) { +func Duration(duration string) (int, error) { m := durationRegex.FindStringSubmatch(duration) if m == nil || len(m) == 0 { return 0, fmt.Errorf("duration invalid: %v", duration) -- cgit v1.2.3