12 lines
257 B
Go
12 lines
257 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func (ctx *ServerContext) HandleFile(w http.ResponseWriter, req *http.Request) error {
|
|
ctx.WG.Add(1)
|
|
defer ctx.WG.Done()
|
|
http.ServeFile(w, req, ctx.Config.FileRoot + "/" + req.URL.Path);
|
|
return nil
|
|
}
|