2018-06-12 10:09:47 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
func renderKernel(w http.ResponseWriter, r *http.Request, ctx *renderContext) error {
|
2018-12-10 10:59:24 +00:00
|
|
|
path, err := ctx.distFetch("kernels", ctx.Host.Kernel)
|
2018-06-12 10:09:47 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2018-12-10 10:59:24 +00:00
|
|
|
log.Printf("sending kernel %s for %q", ctx.Host.Kernel, ctx.Host.Name)
|
2018-06-12 10:09:47 +00:00
|
|
|
http.ServeFile(w, r, path)
|
|
|
|
return nil
|
|
|
|
}
|