aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/date.go7
-rw-r--r--utils/middleware.go8
2 files changed, 8 insertions, 7 deletions
diff --git a/utils/date.go b/utils/date.go
deleted file mode 100644
index 3a6197d..0000000
--- a/utils/date.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package utils
-
-import "time"
-
-func FormatDate(ts int64) string {
- return time.Unix(ts, 0).Format("15:04 02.01.2006")
-}
diff --git a/utils/middleware.go b/utils/middleware.go
new file mode 100644
index 0000000..c297d65
--- /dev/null
+++ b/utils/middleware.go
@@ -0,0 +1,8 @@
+package utils
+
+import "net/http"
+
+// Middleware in itself simply takes a http.Handler as the first parameter, wraps
+// it and returns a new http.Handler for the server to call (wraps handlers with
+// closures according to the principle of Russian doll).
+type Middleware func(http.Handler) http.Handler