summaryrefslogtreecommitdiff
path: root/bin-src/util/date.go
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-09-01 00:33:47 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-09-01 01:45:17 -0600
commitd26030ecbc2d0baa614ff31e8c0c28e98e1d70ab (patch)
tree295604dd1baf4cb3231628b392b530aad16d58cc /bin-src/util/date.go
parentf27db0f7772b3d160e0afececc5b30425ebb2d9b (diff)
Use golangci-lint to modernize my Go
Diffstat (limited to 'bin-src/util/date.go')
-rw-r--r--bin-src/util/date.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin-src/util/date.go b/bin-src/util/date.go
index 3b5c457..8599958 100644
--- a/bin-src/util/date.go
+++ b/bin-src/util/date.go
@@ -6,14 +6,17 @@ import (
)
func Date2HTML(t time.Time) template.HTML {
+ //nolint:gosec // false positive, trusted input
return template.HTML(t.Local().Format("<time datetime=\"2006-01-02 15:04:05\" title=\"2006-01-02 15:04:05\">2006-01-02 <span class=time>15:04:05</span></time>"))
}
func DateTime2HTML(t time.Time) template.HTML {
+ //nolint:gosec // false positive, trusted input
return template.HTML(t.Local().Format("<time datetime=\"2006-01-02 15:04:05\">2006-01-02 15:04:05</time>"))
}
func DateTime2ColorHTML(t time.Time) template.HTML {
+ //nolint:gosec // false positive, trusted input
return template.HTML(t.Local().Format("<time class=daily datetime=\"2006-01-02 15:04:05\">2006-01-02 15:04:05</time>"))
}