Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalFilesystemLoader ¶ added in v1.0.1006
type LocalFilesystemLoader struct {
// contains filtered or unexported fields
}
LocalFilesystemLoader represents a local filesystem loader with basic BaseDirectory capabilities. The access to the local filesystem is unrestricted.
func MustNewLocalFileSystemLoader ¶ added in v1.0.1006
func MustNewLocalFileSystemLoader(baseDir string) *LocalFilesystemLoader
MustNewLocalFileSystemLoader creates a new LocalFilesystemLoader instance and panics if there's any error during instantiation. The parameters are the same like NewLocalFileSystemLoader.
func NewLocalFileSystemLoader ¶ added in v1.0.1006
func NewLocalFileSystemLoader(baseDir string) (*LocalFilesystemLoader, error)
NewLocalFileSystemLoader creates a new LocalFilesystemLoader and allows templatesto be loaded from disk (unrestricted). If any base directory is given (or being set using SetBaseDir), this base directory is being used for path calculation in template inclusions/imports. Otherwise the path is calculated based relatively to the including template's path.
func (*LocalFilesystemLoader) Abs ¶ added in v1.0.1006
func (fs *LocalFilesystemLoader) Abs(base, name string) string
Abs resolves a filename relative to the base directory. Absolute paths are allowed. When there's no base dir set, the absolute path to the filename will be calculated based on either the provided base directory (which might be a path of a template which includes another template) or the current working directory.
func (*LocalFilesystemLoader) Get ¶ added in v1.0.1006
func (fs *LocalFilesystemLoader) Get(path string) (io.Reader, error)
Get reads the path's content from your local filesystem.
func (*LocalFilesystemLoader) SetBaseDir ¶ added in v1.0.1006
func (fs *LocalFilesystemLoader) SetBaseDir(path string) error
SetBaseDir sets the template's base directory. This directory will be used for any relative path in filters, tags and From*-functions to determine your template. See the comment for NewLocalFileSystemLoader as well.
type PongoHTML ¶
PongoHTML strcut
func (*PongoHTML) WriteContentType ¶
func (this *PongoHTML) WriteContentType(w http.ResponseWriter)
WriteContentType for gin interface WriteContentType override