14 lines
270 B
Go
14 lines
270 B
Go
|
|
package api
|
||
|
|
|
||
|
|
import "net/http"
|
||
|
|
|
||
|
|
func Index(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.WriteHeader(http.StatusOK)
|
||
|
|
_, _ = w.Write([]byte(indexHTML))
|
||
|
|
}
|