aboutsummaryrefslogtreecommitdiff
path: root/internal/setting
diff options
context:
space:
mode:
Diffstat (limited to 'internal/setting')
-rw-r--r--internal/setting/computed.go12
-rw-r--r--internal/setting/computed_minwinsvc.go (renamed from internal/setting/miniwinsvc.go)4
-rw-r--r--internal/setting/setting.go1
3 files changed, 14 insertions, 3 deletions
diff --git a/internal/setting/computed.go b/internal/setting/computed.go
new file mode 100644
index 00000000..7bdee053
--- /dev/null
+++ b/internal/setting/computed.go
@@ -0,0 +1,12 @@
+// Copyright 2020 The Gogs 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 setting
+
+var supportWindowsService bool
+
+// SupportWindowsService returns true if running as Windows Service is supported.
+func SupportWindowsService() bool {
+ return supportWindowsService
+}
diff --git a/internal/setting/miniwinsvc.go b/internal/setting/computed_minwinsvc.go
index a7c6890d..27d0ce87 100644
--- a/internal/setting/miniwinsvc.go
+++ b/internal/setting/computed_minwinsvc.go
@@ -1,4 +1,4 @@
-// +build miniwinsvc
+// +build minwinsvc
// Copyright 2015 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
@@ -11,5 +11,5 @@ import (
)
func init() {
- SupportMiniWinService = true
+ supportWindowsService = true
}
diff --git a/internal/setting/setting.go b/internal/setting/setting.go
index fd8d14c0..b95ddbe3 100644
--- a/internal/setting/setting.go
+++ b/internal/setting/setting.go
@@ -314,7 +314,6 @@ var (
// Other settings
ShowFooterBranding bool
ShowFooterTemplateLoadTime bool
- SupportMiniWinService bool
// Global setting objects
Cfg *ini.File