local-server/cmd/dkl-local-server/kernel.go
Mikaël Cluseau 26b6efd54c wip
2018-12-10 21:59:24 +11:00

18 lines
335 B
Go

package main
import (
"log"
"net/http"
)
func renderKernel(w http.ResponseWriter, r *http.Request, ctx *renderContext) error {
path, err := ctx.distFetch("kernels", ctx.Host.Kernel)
if err != nil {
return err
}
log.Printf("sending kernel %s for %q", ctx.Host.Kernel, ctx.Host.Name)
http.ServeFile(w, r, path)
return nil
}