From 10b5351a03254c82816bcb2e8c099b60f4e2e447 Mon Sep 17 00:00:00 2001 From: nmarrs Date: Tue, 9 Dec 2025 12:49:35 -0800 Subject: [PATCH] fix: remove redundant type declaration in shorturl.go Remove explicit time.Time type from referenceTime variable declaration as it can be inferred from the right-hand side, fixing staticcheck ST1023. --- pkg/services/shorturls/shorturlimpl/shorturl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/services/shorturls/shorturlimpl/shorturl.go b/pkg/services/shorturls/shorturlimpl/shorturl.go index aa201e43254..38dc9b6a85b 100644 --- a/pkg/services/shorturls/shorturlimpl/shorturl.go +++ b/pkg/services/shorturls/shorturlimpl/shorturl.go @@ -96,7 +96,7 @@ func normalizePath(pathStr string) string { // If "to" is present and very close to now (within 5 minutes), use it as the reference point // This handles the case where "to" represents "now" at the time the URL was created - var referenceTime time.Time = now + var referenceTime = now if toVal, hasTo := values["to"]; hasTo && len(toVal) > 0 { if toTime, err := time.Parse(time.RFC3339, toVal[0]); err == nil { // Try with nanoseconds too