aboutsummaryrefslogtreecommitdiffstats
path: root/modules/migrations/base/messenger.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-06-16 23:02:24 +0100
committerGitHub <noreply@github.com>2021-06-16 18:02:24 -0400
commit6d69df28047bf7fd3e307391b484a93432615b90 (patch)
tree8a24ce0727f86625c4f469b6744f6f3f2fa27c86 /modules/migrations/base/messenger.go
parent047c39e91bb39d4f31278d8c4082187894ea8263 (diff)
downloadgitea-6d69df28047bf7fd3e307391b484a93432615b90.tar.gz
gitea-6d69df28047bf7fd3e307391b484a93432615b90.zip
Add Status Updates whilst Gitea migrations are occurring (#15076)
* Add migrating message Signed-off-by: Andrew Thornton <art27@cantab.net> * simplify messenger Signed-off-by: Andrew Thornton <art27@cantab.net> * make messenger an interface Signed-off-by: Andrew Thornton <art27@cantab.net> * rename Signed-off-by: Andrew Thornton <art27@cantab.net> * prepare for merge Signed-off-by: Andrew Thornton <art27@cantab.net> * as per tech Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'modules/migrations/base/messenger.go')
-rw-r--r--modules/migrations/base/messenger.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/migrations/base/messenger.go b/modules/migrations/base/messenger.go
new file mode 100644
index 0000000000..a92f59ef7f
--- /dev/null
+++ b/modules/migrations/base/messenger.go
@@ -0,0 +1,11 @@
+// Copyright 2021 The Gitea Authors. All rights reserved.
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file.
+
+package base
+
+// Messenger is a formatting function similar to i18n.Tr
+type Messenger func(key string, args ...interface{})
+
+// NilMessenger represents an empty formatting function
+func NilMessenger(string, ...interface{}) {}