Documentation ¶
Index ¶
- type File
- func (f *File) Bytes() []byte
- func (f *File) Close() error
- func (f *File) Interpolate(values interface{}) (*File, error)
- func (f *File) Read(p []byte) (n int, err error)
- func (f *File) Readdir(count int) ([]fs.FileInfo, error)
- func (f *File) Seek(offset int64, whence int) (int64, error)
- func (f *File) Stat() (fs.FileInfo, error)
- func (f *File) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File is the file magic sauce here.
This will implement the http.File interface and can be used in place of a good old http.File in the standard library.
However we can also call proprietary methods on an IFile so we can do the hacky ass interpolating we want to do so we can have dynamic content in our static workflow.
Why? Because Kris Nóva is insane.
type File interface
io.Closer io.Reader io.Seeker Readdir(count int) ([]fs.FileInfo, error) Stat() (fs.FileInfo, error)
func NewFile ¶
NewFile essentially "extends" the base http.File
Everything you can do with an http.File you can now also do with an
func (*File) Interpolate ¶
Click to show internal directories.
Click to hide internal directories.