Documentation ¶
Index ¶
- type Dir
- type File
- func (f *File) Close() error
- func (f *File) IsDir() bool
- func (f *File) ModTime() time.Time
- func (f *File) Mode() os.FileMode
- func (f *File) Name() string
- func (f *File) Read(p []byte) (n int, err error)
- func (f *File) Readdir(count int) ([]os.FileInfo, error)
- func (f *File) Seek(offset int64, whence int) (int64, error)
- func (f *File) Size() int64
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Sys() interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dir ¶
type Dir string
Dir implements http.FileSystem. This is primarily designed to be used for scenarios where you wish to embed and compile static assets into your Go binary. The files listed using this file system are minified if they are CSS or JavaScript.
I wouldn't recommend using this directly when serving from an HTTP router, as the File methods here aren't terribly efficient. In fact, I bet there are better ways to do this.
Click to show internal directories.
Click to hide internal directories.