more fortunate name static->builtin

This commit is contained in:
Antoni Sawicki 2022-11-06 01:12:26 -08:00
parent d602124ed6
commit fdfbe80024

6
wrp.go
View File

@ -424,16 +424,16 @@ func tmpl(t string) string {
var tmpl []byte var tmpl []byte
fh, err := os.Open(t) fh, err := os.Open(t)
if err != nil { if err != nil {
goto statik goto builtin
} }
tmpl, err = ioutil.ReadAll(fh) tmpl, err = ioutil.ReadAll(fh)
if err != nil { if err != nil {
goto statik goto builtin
} }
log.Printf("Got UI template from %v file\n", t) log.Printf("Got UI template from %v file\n", t)
return string(tmpl) return string(tmpl)
statik: builtin:
fhs, err := fs.Open("/wrp.html") fhs, err := fs.Open("/wrp.html")
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)