blob: 9c41978907d6f4684b3d82a43a6d2958f6d6d8b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// Copyright 2022 Terin Stock.
// SPDX-License-Identifier: EUPL-1.2
package server
import "net/http"
func FileHandler(path string) http.Handler {
return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
http.ServeFile(rw, req, path)
})
}
|