package main import ( "github.com/TremblingV5/DouTok/applications/favorite/handler" "github.com/TremblingV5/DouTok/applications/favorite/misc" "github.com/TremblingV5/DouTok/applications/favorite/rpc" "github.com/TremblingV5/DouTok/applications/favorite/service" "github.com/TremblingV5/DouTok/kitex_gen/favorite/favoriteservice" "github.com/TremblingV5/DouTok/pkg/dlog" "github.com/TremblingV5/DouTok/pkg/initHelper" ) var ( Logger = dlog.InitLog(3) ) func Init() { misc.InitViperConfig() service.Init() rpc.InitPRCClient() go service.UpdateFavMap() go service.UpdateFavCntMap() go service.Consumer4UpdateCount() } func main() { Init() options, shutdown := initHelper.InitRPCServerArgs(misc.Config) defer shutdown() svr := favoriteservice.NewServer( new(handler.FavoriteServiceImpl), options..., ) if err := svr.Run(); err != nil { Logger.Fatal(err) } }