mirror of
https://github.com/axllent/mailpit.git
synced 2025-08-13 20:04:49 +02:00
Improve Prometheus GetMode detection
This commit is contained in:
@@ -178,11 +178,13 @@ func StartSeparateServer() {
|
||||
// GetMode returns the Prometheus run mode
|
||||
func GetMode() string {
|
||||
mode := strings.ToLower(strings.TrimSpace(config.PrometheusListen))
|
||||
if mode == "false" {
|
||||
|
||||
switch {
|
||||
case mode == "false", mode == "":
|
||||
return "disabled"
|
||||
}
|
||||
if mode == "true" {
|
||||
case mode == "true":
|
||||
return "integrated"
|
||||
default:
|
||||
return "separate"
|
||||
}
|
||||
return "separate"
|
||||
}
|
||||
|
Reference in New Issue
Block a user