Files
frp-panel/cmd/frppc/main.go
VaalaCat f07c03ce68 feat: fx
2025-04-26 10:52:21 +00:00

32 lines
759 B
Go

package main
import (
"sync"
"github.com/VaalaCat/frp-panel/biz/common"
"github.com/VaalaCat/frp-panel/biz/master/shell"
"github.com/VaalaCat/frp-panel/conf"
"github.com/VaalaCat/frp-panel/services/app"
"github.com/VaalaCat/frp-panel/services/rpc"
"github.com/VaalaCat/frp-panel/utils/logger"
"github.com/spf13/cobra"
)
func main() {
logger.InitLogger()
cobra.MousetrapHelpText = ""
cfg := conf.NewConfig()
appInstance := app.NewApp()
appInstance.SetConfig(cfg)
appInstance.SetClientsManager(rpc.NewClientsManager())
appInstance.SetStreamLogHookMgr(&common.HookMgr{})
appInstance.SetShellPTYMgr(shell.NewPTYMgr())
appInstance.SetClientRecvMap(&sync.Map{})
initCommand(appInstance)
setMasterCommandIfNonePresent()
rootCmd.Execute()
}