package main import "fmt" import "log" import "net/http" import "hnakra/service" func main () { static := http.FileServer(http.Dir("./static")) http.HandleFunc("/gifs/", gifs) http.Handle("/gifs/static/", http.StripPrefix("/gifs/static", static)) err := service.NewHTTP ( "Gifs", "Serves a lot of big gifs on one page.", "@", "/gifs/").Run() if err != nil { log.Println("XXX", err) } } func gifs (res http.ResponseWriter, req *http.Request) { res.Header().Add("content-type", "text/html") res.WriteHeader(http.StatusOK) img := func (number int) { fmt.Fprintf(res, "", number) } fmt.Fprintln(res, "