zhuguifei
2025-06-17 c1cc49dd93d38f51790558541d6835d1598ecccf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)
    eRouter.Handle("GET", "/api/getValue", api.GetValue)
    eRouter.Handle("POST", "/api/setValue", api.SetValue)
 
    // 使用 gin 注册路由
    eRouter.GinRouter.GET("/api/info", api.Info)
}