dispatch/server/index.egon.go
Ken-Håvard Lieng 09d57b7023 Use easyjson
2018-05-25 23:54:36 +02:00

20 lines
757 B
Go

// Generated by egon.
// 🚫Edit at your own risk.
package server
import (
"io"
"github.com/mailru/easyjson"
)
func IndexTemplate(w io.Writer, data *indexData, cssPath, jsPath string) error {
io.WriteString(w, "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>Dispatch</title><link href=\"/")
io.WriteString(w, cssPath )
io.WriteString(w, "\" rel=\"stylesheet\"><link rel=\"icon\" href=\"data:;base64,=\"></head><body><div id=\"root\"></div><script id=\"env\" type=\"application/json\">")
easyjson.MarshalToWriter(data, w)
io.WriteString(w, "</script><script src=\"/")
io.WriteString(w, jsPath )
io.WriteString(w, "\"></script></body></html>")
return nil
}