1
0

Statically compile templates in the final binary (#84)

This commit is contained in:
konrad
2019-07-11 19:10:42 +00:00
committed by Gitea
parent 1f1a079fd3
commit 50ca8bd28e
30 changed files with 1405 additions and 15 deletions

21
vendor/github.com/shurcooL/httpfs/vfsutil/file.go generated vendored Normal file
View File

@ -0,0 +1,21 @@
package vfsutil
import (
"net/http"
"os"
)
// File implements http.FileSystem using the native file system restricted to a
// specific file served at root.
//
// While the FileSystem.Open method takes '/'-separated paths, a File's string
// value is a filename on the native file system, not a URL, so it is separated
// by filepath.Separator, which isn't necessarily '/'.
type File string
func (f File) Open(name string) (http.File, error) {
if name != "/" {
return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
}
return os.Open(string(f))
}