summaryrefslogtreecommitdiff
path: root/duration.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-26 12:35:32 -0500
committerJeff Carr <[email protected]>2025-10-26 12:35:32 -0500
commitd7ee602d7352943d12e8588623a364c1bf2214ed (patch)
treee603db567a3fe9a5745c8aec393f6e7694b03c37 /duration.go
parent6420336fb6208b7d4b3c40b7b215e38ad8b7f76c (diff)
another case
Diffstat (limited to 'duration.go')
-rw-r--r--duration.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/duration.go b/duration.go
index ea25d47..3243bb4 100644
--- a/duration.go
+++ b/duration.go
@@ -32,14 +32,13 @@ func DurationCheck(maybeTime any) (time.Duration, error) {
case time.Time:
// If the type is time.Time, 'v' is now a time.Time variable.
d = time.Since(v)
+ case *time.Time:
+ d = time.Since(*v)
case time.Duration:
- // If the type is time.Time, 'v' is now a time.Time variable.
d = v
case *time.Duration:
- // If the type is time.Time, 'v' is now a time.Time variable.
d = *v
case string:
- // The type is string, so 'v' is a string variable.
// t, err = doTimeString(v)
err = NewFeature
case *timestamppb.Timestamp: