File size: 285 Bytes
b17c2c8
 
 
48f01ee
 
b17c2c8
 
48f01ee
 
 
b17c2c8
48f01ee
 
 
 
 
 
b17c2c8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package handler

import (
_ "embed"
"net/http"
)

//go:embed index.html
var indexHTML []byte

func HandleIndex(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
http.NotFound(w, r)
return
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.Write(indexHTML)
}