mirror of
https://github.com/tenox7/wrp.git
synced 2024-11-25 13:30:51 +00:00
more fortunate name static->builtin
This commit is contained in:
parent
d602124ed6
commit
fdfbe80024
6
wrp.go
6
wrp.go
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user