mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
It wrote to stderr before logging was set up, outside the log package and its file/format options.
29 lines
569 B
Go
29 lines
569 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
_ "github.com/v2rayA/v2rayA/conf/report"
|
|
"github.com/v2rayA/v2rayA/pkg/util/log"
|
|
)
|
|
|
|
func main() {
|
|
gin.SetMode(gin.ReleaseMode)
|
|
|
|
// Try running as a service (implemented on Windows, returns false on other platforms)
|
|
if tryRunAsService() {
|
|
return
|
|
}
|
|
|
|
// Normal startup (non-service mode)
|
|
checkEnvironment()
|
|
if err := checkPlatformSpecific(); err != nil {
|
|
log.Fatal("Platform check failed: %v", err)
|
|
}
|
|
initConfigure()
|
|
checkUpdate()
|
|
hello()
|
|
if err := run(); err != nil {
|
|
log.Fatal("main: %v", err)
|
|
}
|
|
}
|