1
0
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:
Ralph Slooten
2025-06-06 17:43:20 +12:00
parent e6ab9e1008
commit e3538cb86a

View File

@@ -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"
}