21 lines
336 B
Go
21 lines
336 B
Go
// / +build !release
|
|
package main
|
|
|
|
import (
|
|
"html/template"
|
|
"io"
|
|
"net/http"
|
|
)
|
|
|
|
func staticFileServer() http.Handler {
|
|
return http.FileServer(http.Dir("./static"))
|
|
}
|
|
|
|
func renderTemplate(wr io.Writer) error {
|
|
templates, err := template.ParseGlob("web/*.gohtml")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return templates.Execute(wr, nil)
|
|
}
|