picgo/router/router.go

16 lines
294 B
Go
Raw Normal View History

2024-07-11 21:25:58 +08:00
package router
import (
"net/http"
"picgo/handler"
)
func InitRouter() *http.ServeMux {
var mux *http.ServeMux
// 创建新的路由器
mux = http.NewServeMux()
mux.HandleFunc("/static/", handler.StaticHandler)
mux.HandleFunc("/api/v1/upload", handler.UploadFileHandler)
return mux
}