Documentation ¶
Index ¶
- Constants
- func CopyFromFS(root, dest string, fsys Filesystem) (err error)
- func NewMaskingFS(masked func(path string) bool, fs Filesystem) maskingFS
- func NewOsFilesystem(root string) osFilesystem
- func NewSubFS(root string, fs Filesystem) subFS
- func NewZipFS(archive *zip.Reader) zipFS
- type BillyFilesystem
- type Filesystem
- type UnionFS
Constants ¶
const (
EmbedSchema = "embed"
)
Variables ¶
This section is empty.
Functions ¶
func CopyFromFS ¶
func CopyFromFS(root, dest string, fsys Filesystem) (err error)
CopyFromFS copies files from the `src` dir on the accessor Filesystem to local filesystem into `dest` dir. The src path uses slashes as their separator. The dest path uses OS specific separator.
func NewMaskingFS ¶
func NewMaskingFS(masked func(path string) bool, fs Filesystem) maskingFS
func NewOsFilesystem ¶
func NewOsFilesystem(root string) osFilesystem
func NewSubFS ¶
func NewSubFS(root string, fs Filesystem) subFS
Types ¶
type BillyFilesystem ¶
type BillyFilesystem struct {
// contains filtered or unexported fields
}
BillyFilesystem is a template file accessor backed by a billy FS
func NewBillyFilesystem ¶
func NewBillyFilesystem(fs billy.Filesystem) BillyFilesystem
type Filesystem ¶
Filesystems Wrap the implementations of FS with their subtle differences into the common interface for accessing template files defined herein. os: standard for on-disk extensible template repositories. zip: embedded filesystem backed by the byte array representing zipfile. billy: go-git library's filesystem used for remote git template repos.
type UnionFS ¶
type UnionFS struct {
// contains filtered or unexported fields
}
UnionFS is an os.FS and embed.FS union fs. Files in embed.FS has the header "embed://", and files in os.FS don't have this header.