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
|
||||
fh, err := os.Open(t)
|
||||
if err != nil {
|
||||
goto statik
|
||||
goto builtin
|
||||
}
|
||||
tmpl, err = ioutil.ReadAll(fh)
|
||||
if err != nil {
|
||||
goto statik
|
||||
goto builtin
|
||||
}
|
||||
log.Printf("Got UI template from %v file\n", t)
|
||||
return string(tmpl)
|
||||
|
||||
statik:
|
||||
builtin:
|
||||
fhs, err := fs.Open("/wrp.html")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
Loading…
Reference in New Issue
Block a user