Documentation ¶
Index ¶
- Variables
- func CurrentExecutable(f Format) (http.FileSystem, error)
- func FromFile(f Format, path string) (http.FileSystem, error)
- func FromReader(f Format, r io.Reader) (http.FileSystem, error)
- func FromString(f Format, content string) (http.FileSystem, error)
- func Must(fs http.FileSystem, err error) http.FileSystem
- type Dir
- type DirInfo
- type File
- type FileReader
- type Format
- type MemoizingReadCloser
- type ReadSeekCloser
Constants ¶
This section is empty.
Variables ¶
View Source
var Tar = &fnFormat{
loadFn: decodeTar,
}
View Source
var Zip = &fnFormat{
loadFn: decodeZip,
}
Functions ¶
func CurrentExecutable ¶
func CurrentExecutable(f Format) (http.FileSystem, error)
Load the current executable as an archive. If you've appended your zip file of assets to your executable, this is how you should retrieve them.
func FromFile ¶
func FromFile(f Format, path string) (http.FileSystem, error)
Load an archive from a file path.
func FromReader ¶
Load an archive from an io.Reader.
func FromString ¶
func FromString(f Format, content string) (http.FileSystem, error)
Load an archive from a string of binary data.
func Must ¶
func Must(fs http.FileSystem, err error) http.FileSystem
Ensure that the filesystem is loaded. If loading the filesystem fails, this will panic.
Types ¶
type Dir ¶
type Dir struct {
// contains filtered or unexported fields
}
type DirInfo ¶
type DirInfo struct {
*Dir
}
type FileReader ¶
type FileReader struct { *File // contains filtered or unexported fields }
func (*FileReader) Close ¶
func (tfr *FileReader) Close() error
type MemoizingReadCloser ¶
type MemoizingReadCloser struct { io.ReadCloser // contains filtered or unexported fields }
func NewMemoizingReadCloser ¶
func NewMemoizingReadCloser(r io.ReadCloser) *MemoizingReadCloser
func (*MemoizingReadCloser) Read ¶
func (this *MemoizingReadCloser) Read(b []byte) (n int, err error)
func (*MemoizingReadCloser) Rewind ¶
func (this *MemoizingReadCloser) Rewind()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.