mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Fix: rand seeding error / Test: conf/version and util
This commit is contained in:
4
main.go
4
main.go
@@ -5,12 +5,16 @@ import (
|
||||
"cloudreve/pkg/conf"
|
||||
"cloudreve/routers"
|
||||
"github.com/gin-gonic/gin"
|
||||
"math/rand"
|
||||
"time"
|
||||
)
|
||||
|
||||
func init() {
|
||||
conf.Init("conf/conf.ini")
|
||||
model.Init()
|
||||
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
|
||||
// Debug 关闭时,切换为生产模式
|
||||
if !conf.SystemConfig.Debug {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
|
||||
Reference in New Issue
Block a user