Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadFilesRecursively ¶
func LoadFilesRecursively(dir string, predicates ...FileInfoPredicate) (map[string][]byte, error)
LoadFilesRecursively returns a map from relative path names to file content.
Types ¶
type Asset ¶
type Asset struct { Name string FilePermission Permission Data []byte }
Asset defines a single static asset.
func MustCreateAssetFromTemplate ¶
MustCreateAssetFromTemplate process the given template using and return an asset.
type Assets ¶
type Assets []Asset
Assets is a list of assets.
func New ¶
func New(dir string, data interface{}, predicates ...FileInfoPredicate) (Assets, error)
New walks through a directory recursively and renders each file as asset. Only those files are rendered that make all predicates true.
func (Assets) WriteFiles ¶
WriteFiles writes the assets to specified path.
type FileInfoPredicate ¶
type Permission ¶
const ( PermissionDirectoryDefault Permission = 0755 PermissionFileDefault Permission = 0644 PermissionFileRestricted Permission = 0600 )
Click to show internal directories.
Click to hide internal directories.