diff options
Diffstat (limited to 'routers/install/install.go')
-rw-r--r-- | routers/install/install.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/routers/install/install.go b/routers/install/install.go index 2962f3948f..4b3eba78b3 100644 --- a/routers/install/install.go +++ b/routers/install/install.go @@ -10,6 +10,7 @@ import ( "os" "os/exec" "path/filepath" + "slices" "strconv" "strings" "time" @@ -99,11 +100,8 @@ func Install(ctx *context.Context) { curDBType := setting.Database.Type.String() var isCurDBTypeSupported bool - for _, dbType := range setting.SupportedDatabaseTypes { - if dbType == curDBType { - isCurDBTypeSupported = true - break - } + if slices.Contains(setting.SupportedDatabaseTypes, curDBType) { + isCurDBTypeSupported = true } if !isCurDBTypeSupported { curDBType = "mysql" |