You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
964 B
38 lines
964 B
package main
|
|
|
|
import (
|
|
"appNewPlatform/appConstant"
|
|
"appNewPlatform/initialization"
|
|
"fmt"
|
|
"runtime"
|
|
)
|
|
|
|
func main() {
|
|
var Ncpu = runtime.NumCPU()
|
|
fmt.Printf("服务器核心数量:%v\n", Ncpu)
|
|
if Ncpu-1 <= 0 {
|
|
Ncpu = 1
|
|
} else {
|
|
Ncpu = Ncpu - 1
|
|
}
|
|
appConstant.MaxCpuNumber = Ncpu
|
|
fmt.Printf("设置并发服务器核心数量:%v\n", Ncpu)
|
|
runtime.GOMAXPROCS(Ncpu) //设置使用核心数量
|
|
|
|
// inputImagePath := ".\\assets\\img\\1.png" // 替换为实际的输入图像路径,可支持PNG或JPEG
|
|
// outputSVGPath := "./assets/svg/output_image1111.svg" // 替换为实际的输出SVG路径
|
|
|
|
// common.JpgPngToSvgw(inputImagePath, outputSVGPath)
|
|
// if err != nil {
|
|
// fmt.Println("转换失败:", err)
|
|
// } else {
|
|
// fmt.Println("转换成功,SVG文件已生成:", outputSVGPath)
|
|
// }
|
|
|
|
//加载数据库
|
|
initialization.LoadingDatabase()
|
|
//加载Redis
|
|
initialization.LoadRedis()
|
|
//启动App
|
|
initialization.RunItem()
|
|
}
|
|
|