Files
ds2api/api/index.go
2026-02-16 18:04:12 +08:00

21 lines
229 B
Go

package handler
import (
"net/http"
"sync"
"ds2api/app"
)
var (
once sync.Once
h http.Handler
)
func Handler(w http.ResponseWriter, r *http.Request) {
once.Do(func() {
h = app.NewHandler()
})
h.ServeHTTP(w, r)
}