first commit
This commit is contained in:
17
internal/handler/helpers.go
Normal file
17
internal/handler/helpers.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func formatDate(t time.Time) string {
|
||||
if t.IsZero() {
|
||||
return ""
|
||||
}
|
||||
return t.Format("2 January 2006")
|
||||
}
|
||||
|
||||
func joinTags(tags []string) string {
|
||||
return strings.Join(tags, ", ")
|
||||
}
|
||||
Reference in New Issue
Block a user