package router

import (
	"github.com/gogf/gf/v2/net/ghttp"
	"go.uber.org/dig"
	"yx-dataset-server/router/api"
	"yx-dataset-server/router/robot"
	"yx-dataset-server/router/web"
)

// InitRouters 初始化路由注册
func InitRouters(s *ghttp.Server, container *dig.Container) {
	// 注册api路由组
	err := api.RegisterRouters(s, container)
	if err != nil {
		panic(err)
	}

	// 注册web路由组
	err = web.RegisterRouters(s, container)
	if err != nil {
		panic(err)
	}

	// 注册robot路由组
	err = robot.RegisterRouters(s, container)
	if err != nil {
		panic(err)
	}
}
