Emperor_Shun_Reading/go/router/router.go

18 lines
304 B
Go
Raw Permalink Normal View History

2024-08-22 01:03:01 +00:00
package router
import (
"electron-egg/api"
eRouter "github.com/wallace5303/ee-go/ehttp/router"
)
func Api() {
// 注册路由
eRouter.Handle("GET", "/api/hello", api.Hello)
eRouter.Handle("GET", "/api/exit", api.Exit)
// 使用 gin 注册路由
eRouter.GinRouter.GET("/api/info", api.Info)
}