File size: 229 Bytes
8d3471e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)
}