Use embedded index.html, bumped to v3
This commit is contained in:
parent
2098da3417
commit
9dafb5383d
1 changed files with 2 additions and 5 deletions
7
main.go
7
main.go
|
|
@ -17,7 +17,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const VERSION = "v2"
|
const VERSION = "v3"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
flagVerbose bool
|
flagVerbose bool
|
||||||
|
|
@ -69,10 +69,7 @@ func replaceTilde(str string) string { // {{{
|
||||||
func pageIndex(w http.ResponseWriter, r *http.Request) { // {{{
|
func pageIndex(w http.ResponseWriter, r *http.Request) { // {{{
|
||||||
var tmpl *template.Template
|
var tmpl *template.Template
|
||||||
var err error
|
var err error
|
||||||
if false {
|
tmpl, err = template.ParseFS(fs, "static/html/index.html")
|
||||||
tmpl, err = template.ParseFS(fs, "static/html/index.html")
|
|
||||||
}
|
|
||||||
tmpl, err = template.ParseFiles("static/html/index.html")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.Write([]byte(err.Error()))
|
w.Write([]byte(err.Error()))
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue