aboutsummaryrefslogtreecommitdiff
path: root/pkg/util
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-26 00:23:49 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-26 00:23:49 +0200
commita83e9bd36fc6a934553d93cbcc0edb120321f971 (patch)
treea9cc04ca3a0f8392f6ccbf470b323794e535ae7a /pkg/util
parent87fd0ad3e9309064fe9fda373035f5ce127ae8d8 (diff)
downloadfeed2imap-go-a83e9bd36fc6a934553d93cbcc0edb120321f971.tar.gz
feed2imap-go-a83e9bd36fc6a934553d93cbcc0edb120321f971.tar.bz2
feed2imap-go-a83e9bd36fc6a934553d93cbcc0edb120321f971.zip
Filtering from cache
Diffstat (limited to '')
-rw-r--r--pkg/util/util.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/util/util.go b/pkg/util/util.go
index c5472ab..659c886 100644
--- a/pkg/util/util.go
+++ b/pkg/util/util.go
@@ -1,5 +1,7 @@
package util
+import "time"
+
func StrContains(haystack []string, needle string) bool {
for _, s := range haystack {
if s == needle {
@@ -9,3 +11,11 @@ func StrContains(haystack []string, needle string) bool {
return false
}
+
+func TimeFormat(t time.Time) string {
+ if t.IsZero() {
+ return "not set"
+ } else {
+ return t.Format(time.ANSIC)
+ }
+}
href='/others/cgit.git/commit/ui-summary.c?h=v0.8.2.1&id=d14c5f6d3ac827e7b46831c4151638ab4b638ae1&follow=1'>Move log-functions into ui-log.cLars Hjemli5-111/+121 2006-12-11Move repo summary functions into ui-summary.cLars Hjemli4-47/+59 2006-12-11Move functions for repolist output into ui-repolist.cLars Hjemli5-70/+90 2006-12-11Move common output-functions into ui-shared.cLars Hjemli4-82/+99 2006-12-11Rename config.c to parsing.c + move cgit_parse_query from cgit.c to parsing.cLars Hjemli4-28/+29 2006-12-11Avoid infinite loops in caching layerLars Hjemli3-14/+31 2006-12-11Let 'make install' clear all cachefilesLars Hjemli1-0/+2 2006-12-11Fix cache algorithm loopholeLars Hjemli3-11/+16 2006-12-10Add version identifier in generated filesLars Hjemli2-9/+14 2006-12-10Add license file and copyright noticesLars Hjemli5-0/+372 2006-12-10Add caching infrastructureLars Hjemli9-28/+353