You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
synctv/internal/bootstrap/gin.go

25 lines
400 B
Go

package bootstrap
import (
"context"
"github.com/gin-gonic/gin"
"github.com/synctv-org/synctv/cmd/flags"
"github.com/synctv-org/synctv/utils"
)
func InitGinMode(ctx context.Context) error {
if flags.Global.Dev {
gin.SetMode(gin.DebugMode)
} else {
gin.SetMode(gin.ReleaseMode)
}
if utils.ForceColor() {
gin.ForceConsoleColor()
} else {
gin.DisableConsoleColor()
}
return nil
}